public class WalkImageSequence
extends java.lang.Object
implements java.beans.PropertyChangeListener
This class maintains a list of WalkImages and provides functionality
for navigating through it. Whenever the current index is changed, whether explicitly
set or via one of the navigation functions, a PropertyChangeEvent is fired.
This allows UI code to control the index and view code to respond.
Access is also provided to the WalkImage objects so that view
code can retrieve images, thumbnails, etc.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PROP_BADGE_CHANGE |
static java.lang.String |
PROP_IMAGE_LOADED |
static java.lang.String |
PROP_INDEX |
static java.lang.String |
PROP_SELECTED_INDECES |
static java.lang.String |
PROP_SEQUENCE_CHANGED |
static java.lang.String |
PROP_STATUS |
static java.lang.String |
PROP_THUMB_LOADED |
static java.lang.String |
PROP_TIMERANGE |
static java.lang.String |
PROP_USESUBRANGE |
protected java.lang.String |
status |
| Constructor and Description |
|---|
WalkImageSequence(java.lang.String template)
Create an image sequence based on a URI template.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
things we fire events for:
PROP_BADGE_CHANGE
and others
|
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener) |
WalkImage |
currentImage() |
int |
findIndex(java.lang.String name)
returns the index of the name, or -1 if the name is not found.
|
void |
first()
Move the index to the first image in the list.
|
java.util.List<DatumRange> |
getActiveSubrange()
return the active subrange of the sequence.
|
java.util.List<DatumRange> |
getAllTimes()
Return a
java.awt.List of the times associated with this sequence. |
WalkImage |
getImage(java.net.URI image)
return the WalkImage object for the given URI.
|
int |
getIndex()
Return the current value of the index, where index is that of the displayImages.
|
java.net.URI |
getQCFolder() |
QualityControlSequence |
getQualityControlSequence()
this may be null if even though we are using QualityControl, if the user
hasn't logged in yet.
|
java.util.List<java.lang.Integer> |
getSelectedIndeces() |
java.lang.String |
getSelectedName()
return the name of the selected image.
|
java.lang.String |
getStatus()
get the current status
|
java.lang.String |
getTemplate()
return the template representing the sequence.
|
DatumRange |
getTimerange()
constraint for the limit of the time ranges listed.
|
DatumRange |
getTimeSpan()
Return the time range covered by this sequence.
|
WalkImage |
imageAt(int n)
return the image of the subrange.
|
WalkImage |
imageAtNoSubRange(int n)
get the image in the sequence, regardless of the subrange.
|
protected int |
indexOfSubrange(DatumRange dr)
return the index of the datumRange completely containing this
interval.
|
void |
initialLoad()
do the initial listing of the remote filesystem.
|
protected void |
initQualitySequence(java.net.URI qcFolder)
initialize the quality control sequence.
|
protected boolean |
isLimitWarning() |
boolean |
isShowMissing() |
boolean |
isUseSubRange() |
void |
last()
Move the image to the last image in the list.
|
void |
next()
Advance the index to the next image in the list.
|
void |
prev()
Step the index to the previous image in the list.
|
void |
propertyChange(java.beans.PropertyChangeEvent e) |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l) |
void |
removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener) |
void |
setActiveSubrange(DatumRange range)
Convenience method for to set the subrange to the items intersecting the given range.
|
void |
setActiveSubrange(int first,
int last)
Set the sequence's active subrange to a range from first to last, inclusive.
|
void |
setIndex(int index)
Set the index explicitly.
|
void |
setQCFilter(java.lang.String s)
string containing combination of "opi" meaning that each should be shown.
|
void |
setQCFolder(java.net.URI folder) |
void |
setSelectedIndeces(java.util.List<java.lang.Integer> sel) |
void |
setShowMissing(boolean showMissing) |
protected void |
setStatus(java.lang.String status)
set the current status, which is echoed back to the scientist.
|
void |
setTimerange(DatumRange timerange)
constraint for the limit of the time ranges listed.
|
void |
setUseSubRange(boolean useSubRange) |
int |
size()
return the number of images in the sequence.
|
void |
skipBy(int n)
Skip forward or backward by the specified number of images.
|
public static final java.lang.String PROP_INDEX
public static final java.lang.String PROP_SELECTED_INDECES
public static final java.lang.String PROP_IMAGE_LOADED
public static final java.lang.String PROP_THUMB_LOADED
public static final java.lang.String PROP_USESUBRANGE
public static final java.lang.String PROP_SEQUENCE_CHANGED
public static final java.lang.String PROP_BADGE_CHANGE
public static final java.lang.String PROP_TIMERANGE
protected java.lang.String status
public static final java.lang.String PROP_STATUS
public WalkImageSequence(java.lang.String template)
template - a template, or null will produce an empty walk sequence.public DatumRange getTimerange()
public void setTimerange(DatumRange timerange)
timerange - public void initialLoad()
throws java.io.IOException
java.io.IOExceptionprotected int indexOfSubrange(DatumRange dr)
dr - protected boolean isLimitWarning()
protected void initQualitySequence(java.net.URI qcFolder)
qcFolder - URI with the password resolved.public WalkImage currentImage()
public WalkImage getImage(java.net.URI image)
image - the locationpublic WalkImage imageAt(int n)
n - public WalkImage imageAtNoSubRange(int n)
n - public java.net.URI getQCFolder()
public void setQCFolder(java.net.URI folder)
public QualityControlSequence getQualityControlSequence()
public boolean isShowMissing()
public void setShowMissing(boolean showMissing)
public boolean isUseSubRange()
public void setUseSubRange(boolean useSubRange)
public void setActiveSubrange(int first,
int last)
getAllTimes().first - last - public void setActiveSubrange(DatumRange range)
range - public void setQCFilter(java.lang.String s)
s - public java.util.List<DatumRange> getActiveSubrange()
https://sourceforge.net/p/autoplot/feature-requests/493/public DatumRange getTimeSpan()
public java.util.List<DatumRange> getAllTimes()
java.awt.List of the times associated with this sequence.
This list will include times associated with missing images, and is not restricted
to any currently active subrange.public int getIndex()
public void setIndex(int index)
index - java.lang.IndexOutOfBoundsException - when...public void setSelectedIndeces(java.util.List<java.lang.Integer> sel)
public java.util.List<java.lang.Integer> getSelectedIndeces()
public void next()
public void prev()
public void first()
public void last()
public void skipBy(int n)
n - The number of images to skip.public int size()
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
l - public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
public void removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
public void addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
public java.lang.String getTemplate()
public java.lang.String getStatus()
protected void setStatus(java.lang.String status)
status - the statuspublic void propertyChange(java.beans.PropertyChangeEvent e)
propertyChange in interface java.beans.PropertyChangeListenerpublic int findIndex(java.lang.String name)
name - the file name.public java.lang.String getSelectedName()