public class IstiRegionPanel
extends javax.swing.JPanel
implements java.awt.event.WindowListener
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
javax.swing.AbstractAction |
addCircleButtonActionObj
Action object for the "Add Circle" button.
|
javax.swing.AbstractAction |
addPolyButtonActionObj
Action object for the "Add Poly" button.
|
protected boolean |
centerEditDialogFlag
Flag set true if the edit dialog should be centered.
|
static java.lang.String |
CLOSE_OPTION_TEXT
Close option text.
|
javax.swing.AbstractAction |
copyButtonActionObj
Action object for the "Copy" button.
|
protected static java.lang.String |
DEF_NEWREGION_NAME
Default region name text.
|
protected boolean |
dialogModalFlag
Flag set true if the dialogs are modal.
|
protected IstiDialogPopup |
dialogObj
Dialog object for this panel.
|
protected IstiDialogUtil |
dialogUtilObj
Dialog utility object for popup messages.
|
javax.swing.AbstractAction |
editButtonActionObj
Action object for the "Edit" button.
|
static java.lang.String |
HELP_OPTION_TEXT
Help option text.
|
protected boolean |
mouseClickEditFlag
Flag set true if region-edit via double-click on list is enabled.
|
protected java.lang.String |
newRegionNameStr
Name to be pre-filled in new regions.
|
javax.swing.AbstractAction |
removeButtonActionObj
Action object for the "Remove" button.
|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
IstiRegionPanel()
Creates a region panel with all 'IstiRegion' option groups.
|
IstiRegionPanel(java.util.List optionGroups)
Creates a region panel.
|
Modifier and Type | Method and Description |
---|---|
void |
addActionListener(java.awt.event.ActionListener l)
Adds an
ActionListener to the panel. |
protected void |
addNewRegion(boolean circleFlag)
Creates, edits and adds a new region object.
|
protected void |
closeRegionEditPanel()
Closes the region edit panel.
|
protected void |
copyToNewRegion()
Shows a list of regions; then shows an add-region dialog with entries
copied from the selected source region.
|
IstiDialogPopup |
createDialog(java.lang.String titleStr,
java.awt.Component regionParentComp)
Creates a dialog for the specified region panel.
|
IstiDialogPopup |
createDialog(java.lang.String titleStr,
java.awt.Component regionParentComp,
boolean modalFlag)
Creates a dialog for the specified region panel.
|
IstiDialogPopup |
createDialog(java.lang.String titleStr,
java.awt.Component regionParentComp,
java.awt.Component regionEditParentComp)
Creates a dialog for the specified region panel.
|
IstiDialogPopup |
createDialog(java.lang.String titleStr,
java.awt.Component regionParentComp,
java.awt.Component regionEditParentComp,
boolean modalFlag)
Creates a dialog for the specified region panel.
|
protected void |
editSelectedRegion()
Edits the region that is currently selected on the GUI list.
|
protected void |
editSpecifiedRegion(java.lang.String specStr,
int specIdx)
Edits the region that is currently selected on the GUI list.
|
protected void |
fireActionPerformed(java.awt.event.ActionEvent event)
Notifies all listeners that have registered interest for notification on
this event type.
|
IstiDialogPopup |
getDialog()
Gets the dialog for this panel.
|
java.lang.String |
getRegionString()
Gets the region string.
|
boolean |
isDialogVisible()
Determines if the dialog for this panel is visible.
|
boolean |
isHelpActionListenerInstalled()
Returns true if the "Help"-button action listener is installed.
|
void |
notifyHelpActionListener(java.lang.Object source)
Notify the help action listener.
|
protected void |
notifyRegionsUpdated()
Notify regions updated.
|
protected void |
openRegionEditPanel(java.lang.String regionStr,
int regionIndex)
Opens the region edit panel for the specified region.
|
void |
removeActionListener(java.awt.event.ActionListener l)
Removes an
ActionListener from the panel. |
protected void |
removeSelectedRegions()
Removes the one or more regions that are currently selected on the GUI
list.
|
void |
requestFocus()
Overridden version that also calls 'requestFocus()' on the dialog hosting
this panel.
|
protected void |
selectAndShowListRegion(int idx)
Selects the given entry on the GUI list of regions and ensures that the
entry is visible.
|
protected void |
setButtonsEnabled(boolean b)
Enables or disables the buttons.
|
void |
setHelpActionListener(java.awt.event.ActionListener l)
Sets the "Help" button action listener.
|
void |
setIstiRegionMgrObj(com.isti.util.gis.IstiRegionMgrIntf istiRegionMgrObj)
Sets the region-manager object to be used by this panel.
|
void |
setNewRegionNameStr(java.lang.String nameStr)
Sets the name to be pre-filled when adding a new region.
|
void |
setRegionString(java.lang.String str)
Sets the region string.
|
void |
showDialog(java.awt.Component regionParentComp,
java.lang.String titleStr)
Shows a dialog for the specified region panel.
|
void |
showDialog(java.awt.Component regionParentComp,
java.lang.String titleStr,
boolean modalFlag)
Shows a dialog for the specified region panel.
|
void |
windowActivated(java.awt.event.WindowEvent e)
Invoked when the window is set to be the user's active window, which means
the window (or one of its subcomponents) will receive keyboard events.
|
void |
windowClosed(java.awt.event.WindowEvent e)
Invoked when a window has been closed as the result of calling dispose on
the window.
|
void |
windowClosing(java.awt.event.WindowEvent e)
Invoked when the user attempts to close the window from the window's system
menu.
|
void |
windowDeactivated(java.awt.event.WindowEvent e)
Invoked when a window is no longer the user's active window, which means
that keyboard events will no longer be delivered to the window or its
subcomponents.
|
void |
windowDeiconified(java.awt.event.WindowEvent e)
Invoked when a window is changed from a minimized to a normal state.
|
void |
windowIconified(java.awt.event.WindowEvent e)
Invoked when a window is changed from a normal to a minimized state.
|
void |
windowOpened(java.awt.event.WindowEvent e)
Invoked the first time a window is made visible.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, 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, 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, update
add, 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, validateTree
action, 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, 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, transferFocusUpCycle
public static final java.lang.String CLOSE_OPTION_TEXT
protected static final java.lang.String DEF_NEWREGION_NAME
public static final java.lang.String HELP_OPTION_TEXT
public final javax.swing.AbstractAction addCircleButtonActionObj
public final javax.swing.AbstractAction addPolyButtonActionObj
protected boolean centerEditDialogFlag
public final javax.swing.AbstractAction copyButtonActionObj
protected boolean dialogModalFlag
protected IstiDialogPopup dialogObj
protected final IstiDialogUtil dialogUtilObj
public final javax.swing.AbstractAction editButtonActionObj
protected boolean mouseClickEditFlag
protected java.lang.String newRegionNameStr
public final javax.swing.AbstractAction removeButtonActionObj
public IstiRegionPanel()
public IstiRegionPanel(java.util.List optionGroups)
optionGroups
- the 'IstiRegion' option groups or null for all.public void addActionListener(java.awt.event.ActionListener l)
ActionListener
to the panel.l
- the ActionListener
to be addedprotected void addNewRegion(boolean circleFlag)
circleFlag
- true for circle, false for polygon.protected void closeRegionEditPanel()
protected void copyToNewRegion()
public IstiDialogPopup createDialog(java.lang.String titleStr, java.awt.Component regionParentComp)
titleStr
- the title for the region panel.regionParentComp
- the parent for the region panel.public IstiDialogPopup createDialog(java.lang.String titleStr, java.awt.Component regionParentComp, boolean modalFlag)
titleStr
- the title for the region panel.regionParentComp
- the parent for the region panel.modalFlag
- true for a modal dialog, false for modeless (allows
other windows to run).public IstiDialogPopup createDialog(java.lang.String titleStr, java.awt.Component regionParentComp, java.awt.Component regionEditParentComp)
titleStr
- the title for the region panel.regionParentComp
- the parent for the region panel.regionEditParentComp
- the parent for region edit panel or null to use
the region panel.public IstiDialogPopup createDialog(java.lang.String titleStr, java.awt.Component regionParentComp, java.awt.Component regionEditParentComp, boolean modalFlag)
titleStr
- the title for the region panel.regionParentComp
- the parent for the region panel.regionEditParentComp
- the parent for region edit panel or null to use
the region panel.modalFlag
- true for a modal dialog, false for modeless
(allows other windows to run).protected void editSelectedRegion()
protected void editSpecifiedRegion(java.lang.String specStr, int specIdx)
specStr
- region string to edit.specIdx
- index of given region string, or -1 if adding new region.protected void fireActionPerformed(java.awt.event.ActionEvent event)
event
- the ChangeEvent
objectEventListenerList
public IstiDialogPopup getDialog()
public java.lang.String getRegionString()
public boolean isDialogVisible()
public boolean isHelpActionListenerInstalled()
public void notifyHelpActionListener(java.lang.Object source)
source
- the object that originated the eventprotected void notifyRegionsUpdated()
protected void openRegionEditPanel(java.lang.String regionStr, int regionIndex)
regionStr
- the region-text string, or an empty string for none.regionIndex
- the region index.public void removeActionListener(java.awt.event.ActionListener l)
ActionListener
from the panel. If the listener is
the currently set Action
for the button, then the
Action
is set to null
.l
- the listener to be removedprotected void removeSelectedRegions()
public void requestFocus()
requestFocus
in class javax.swing.JComponent
protected void selectAndShowListRegion(int idx)
idx
- the index of the region entry.protected void setButtonsEnabled(boolean b)
b
- true to enable, false to disable.public void setHelpActionListener(java.awt.event.ActionListener l)
l
- the action listener.public void setIstiRegionMgrObj(com.isti.util.gis.IstiRegionMgrIntf istiRegionMgrObj)
istiRegionMgrObj
- region-manger object to use.public void setNewRegionNameStr(java.lang.String nameStr)
nameStr
- region name to use.public void setRegionString(java.lang.String str)
str
- the region string.public void showDialog(java.awt.Component regionParentComp, java.lang.String titleStr)
regionParentComp
- the parent for the region panel.titleStr
- the title for the region panel.public void showDialog(java.awt.Component regionParentComp, java.lang.String titleStr, boolean modalFlag)
regionParentComp
- the parent for the region panel.titleStr
- the title for the region panel.modalFlag
- true for a modal dialog, false for modeless (allows
other windows to run).public void windowActivated(java.awt.event.WindowEvent e)
windowActivated
in interface java.awt.event.WindowListener
e
- window eventpublic void windowClosed(java.awt.event.WindowEvent e)
windowClosed
in interface java.awt.event.WindowListener
e
- window eventpublic void windowClosing(java.awt.event.WindowEvent e)
windowClosing
in interface java.awt.event.WindowListener
e
- window eventpublic void windowDeactivated(java.awt.event.WindowEvent e)
windowDeactivated
in interface java.awt.event.WindowListener
e
- window eventpublic void windowDeiconified(java.awt.event.WindowEvent e)
windowDeiconified
in interface java.awt.event.WindowListener
e
- window eventpublic void windowIconified(java.awt.event.WindowEvent e)
windowIconified
in interface java.awt.event.WindowListener
e
- window eventFrame.setIconImage(java.awt.Image)
public void windowOpened(java.awt.event.WindowEvent e)
windowOpened
in interface java.awt.event.WindowListener
e
- window event