public final class PngWalkTool
extends javax.swing.JPanel
| Modifier and Type | Class and Description |
|---|---|
static interface |
PngWalkTool.ActionEnabler |
javax.swing.JPanel.AccessibleJPaneljavax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
protected char |
annoTypeChar |
protected DataPointRecorder |
digitizer |
protected boolean |
digitizerRecording |
static PngWalkTool.ActionEnabler |
LOCAL_FILE_ENABLER
Enabler that returns true for local files.
|
static java.lang.String |
PREF_LAST_EXPORT
last location where image was exported
|
static java.lang.String |
PREF_RECENT |
static java.lang.String |
PROP_IMAGEMOUSEADAPTER |
static java.lang.String |
PROP_MOUSEPRESSLOCATION |
static java.lang.String |
PROP_MOUSERELEASELOCATION |
static java.lang.String |
PROP_SELECTED_NAME |
static java.lang.String |
PROP_STATUS |
static java.lang.String |
PROP_THUMBNAILSIZE |
static java.lang.String |
PROP_TIMERANGE |
protected java.lang.String |
status |
protected int |
thumbnailSize |
PngWalkView[] |
views |
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
PngWalkTool()
Creates new form PngWalkTool
|
| Modifier and Type | Method and Description |
|---|---|
void |
addActionComponent(javax.swing.JComponent c,
java.beans.PropertyChangeListener p)
add a component that will get property change events and should respond
to property changes.
|
void |
addFileAction(PngWalkTool.ActionEnabler match,
javax.swing.Action abstractAction)
Add a file action button to the GUI.
|
void |
addTopDecorator(Painter p)
add a decorator to the PngWalkTool, which is drawn on single-image
views.
|
void |
clearBottomLeftPanel()
remove all components from the bottom left panel.
|
protected static void |
copyToClipboard(java.awt.Component parent,
java.lang.String ssrc)
copy image to the system clipboard.
|
void |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
we need to make this public.
|
DataPointRecorder |
getDigitizerDataPointRecorder()
provide access to the digitizer DataPointRecorder, so that points
can be deleted programmatically.
|
java.awt.event.MouseAdapter |
getImageMouseAdapter() |
QDataSet |
getMousePressLocation() |
QDataSet |
getMouseReleaseLocation() |
javax.swing.JPanel |
getNavigationPanel()
get a reference to the navigation panel.
|
java.lang.String |
getPwd()
return the present working directory of the .pngwalk file (if used).
|
java.lang.String |
getQCTUrl()
return the path for the quality control data.
|
java.lang.String |
getSelectedFile()
returns the current selection, which may be a URL on a remote site, or null if no sequence has been selected.
|
java.awt.image.BufferedImage |
getSelectedImage()
return the currently selected image.
|
java.lang.String |
getSelectedName()
return the name of the current selection, which is just the globbed or aggregated part of the names.
|
WalkImageSequence |
getSequence()
return the container for the sequence of images, which contains the
current index and provides a method for jumping to other images.
|
java.lang.String |
getStatus() |
TearoffTabbedPane |
getTabs()
provide means for scripts to add component to develop new applications.
|
java.lang.String |
getTemplate()
get the template used to describe the files in the pngwalk.
|
int |
getThumbnailSize() |
DatumRange |
getTimeRange()
rfe https://sourceforge.net/p/autoplot/feature-requests/271/
|
boolean |
hasTopDecorators()
returns true if there are any top decorators.
|
static boolean |
isQualityControlEnabled()
return true of the quality control panel is enabled.
|
static void |
main(java.lang.String[] args) |
void |
removeActionComponent(javax.swing.JComponent c,
java.beans.PropertyChangeListener p) |
void |
removeTopDecorator(Painter p)
remove a decorator to the PngWalkTool, which is drawn on single-image
views.
|
void |
removeTopDecorators()
remove all decorators from the PngWalkTool.
|
protected static void |
saveLocalCopy(java.awt.Component parent,
java.lang.String ssrc)
save a copy of the current selection to a local disk.
|
void |
setBottomLeftPanel(javax.swing.JComponent c)
set a new component for the bottom left panel, where by default the
navigation panel resides.
|
void |
setDigitizerRecording(boolean enable)
this can be used to disable recording of the points.
|
void |
setImageMouseAdapter(java.awt.event.MouseAdapter imageMouseAdapter)
add a mouse event handler, which will get events in the coordinate frame
of the image.
|
void |
setMessage(javax.swing.Icon icon,
java.lang.String message) |
void |
setMessage(java.lang.String message) |
void |
setMousePressLocation(QDataSet mousePressLocation) |
void |
setMouseReleaseLocation(QDataSet mouseReleaseLocation) |
void |
setQCStatus(java.lang.String text,
QualityControlRecord.Status status)
provide a method for setting the QCStatus externally.
|
void |
setSelectedName(java.lang.String name)
set the name of the file to select, which is just the globber or aggregated part of the name.
|
void |
setStatus(java.lang.String message) |
void |
setTemplate(java.lang.String template)
set the template which the PNGWalk Tool will display.
|
void |
setThumbnailSize(int thumbnailSize) |
void |
setTimeRange(DatumRange timeRange)
timerange roughly the focus timerange.
|
static PngWalkTool |
start(java.lang.String template,
java.awt.Window parent)
initialize a new PNGWalkTool with the given template.
|
void |
startDigitizer()
start the digitizer if it is not started already.
|
void |
startQC()
start the quality control if it is not started already.
|
void |
updateTimeRangeFilter() |
void |
writeAnimatedGif()
Write the displayed images to an animated gif.
|
void |
writeContactSheet(java.io.File f)
write the current Grid view to a single PNG file.
|
void |
writeCsv()
write the sequence to a HTML file, so that this can be used to produce
worksheets.
|
void |
writeHtml()
write the sequence to a HTML file, so that this can be used to produce
worksheets.
|
void |
writePdf()
write the sequence to a PDF file, so that this can be used to produce
worksheets.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic static final java.lang.String PREF_RECENT
public static final java.lang.String PREF_LAST_EXPORT
public PngWalkView[] views
protected int thumbnailSize
public static final java.lang.String PROP_THUMBNAILSIZE
public static final java.lang.String PROP_TIMERANGE
public static final java.lang.String PROP_MOUSEPRESSLOCATION
public static final java.lang.String PROP_MOUSERELEASELOCATION
public static final java.lang.String PROP_IMAGEMOUSEADAPTER
protected transient java.lang.String status
public static final java.lang.String PROP_STATUS
protected DataPointRecorder digitizer
protected boolean digitizerRecording
protected char annoTypeChar
public static final PngWalkTool.ActionEnabler LOCAL_FILE_ENABLER
public static final java.lang.String PROP_SELECTED_NAME
public static void main(java.lang.String[] args)
public static PngWalkTool start(java.lang.String template, java.awt.Window parent)
template - the template, such as http://autoplot.org/data/pngwalk/product_$Y$m$d.vapparent - null or a parent component to own this application.protected static void copyToClipboard(java.awt.Component parent,
java.lang.String ssrc)
parent - ssrc - protected static void saveLocalCopy(java.awt.Component parent,
java.lang.String ssrc)
parent - dialog parentssrc - the filepublic void setTemplate(java.lang.String template)
template - file template, like /tmp/$Y$m$d.pngpublic java.lang.String getTemplate()
public java.lang.String getPwd()
public java.lang.String getQCTUrl()
public int getThumbnailSize()
public void setThumbnailSize(int thumbnailSize)
public DatumRange getTimeRange()
public void setTimeRange(DatumRange timeRange)
timeRange - public QDataSet getMousePressLocation()
public void setMousePressLocation(QDataSet mousePressLocation)
public QDataSet getMouseReleaseLocation()
public void setMouseReleaseLocation(QDataSet mouseReleaseLocation)
public java.awt.event.MouseAdapter getImageMouseAdapter()
public void setImageMouseAdapter(java.awt.event.MouseAdapter imageMouseAdapter)
imageMouseAdapter - public java.lang.String getStatus()
public void setStatus(java.lang.String message)
public void setMessage(java.lang.String message)
public void setMessage(javax.swing.Icon icon,
java.lang.String message)
public void startQC()
public void startDigitizer()
public DataPointRecorder getDigitizerDataPointRecorder()
public void setDigitizerRecording(boolean enable)
enable - true means record points, false means don't record.public void writeContactSheet(java.io.File f)
throws java.io.IOException
f - java.io.IOExceptionpublic void addFileAction(PngWalkTool.ActionEnabler match, javax.swing.Action abstractAction)
match - returns true when the action can be applied to the current image.abstractAction - the action.which returns true for local files.public void addActionComponent(javax.swing.JComponent c,
java.beans.PropertyChangeListener p)
c - null or a smallish JComponent that should be about the size of a button.p - null or the listener for the selected file and timerange.public void removeActionComponent(javax.swing.JComponent c,
java.beans.PropertyChangeListener p)
public void addTopDecorator(Painter p)
p - public void removeTopDecorator(Painter p)
p - public void removeTopDecorators()
public boolean hasTopDecorators()
public void setBottomLeftPanel(javax.swing.JComponent c)
c - public void clearBottomLeftPanel()
public javax.swing.JPanel getNavigationPanel()
public java.lang.String getSelectedFile()
public java.lang.String getSelectedName()
public void setSelectedName(java.lang.String name)
name - the new namepublic java.awt.image.BufferedImage getSelectedImage()
public static boolean isQualityControlEnabled()
public void setQCStatus(java.lang.String text,
QualityControlRecord.Status status)
text - message annotating the status change or commenting on status.status - the statuspublic void updateTimeRangeFilter()
public void firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
firePropertyChange in class java.awt.ComponentpropertyName - oldValue - newValue - public TearoffTabbedPane getTabs()
public WalkImageSequence getSequence()
public void writeHtml()
public void writePdf()
public void writeCsv()
public void writeAnimatedGif()