|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
adams.gui.core.BasePanel
adams.flow.transformer.pixelselector.PixelSelectorPanel
public class PixelSelectorPanel
Combines an ImagePanel and a Report table.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static int |
APPROVE_OPTION
the APPROVE option. |
static int |
CANCEL_OPTION
the CANCEL option. |
protected HashSet<ActionListener> |
m_ActionListeners
the action listeners. |
protected AbstractPixelSelectorAction[] |
m_Actions
the actions that are available from the popup menu. |
protected JButton |
m_ButtonCancel
the Cancel button. |
protected JButton |
m_ButtonOK
the OK button. |
protected AbstractImage |
m_Image
the current image container. |
protected ImagePanel |
m_ImagePanel
the image panel. |
protected Hashtable<Class,Object> |
m_LastActionResult
the last action result for a selector action. |
protected JMenuBar |
m_MenuBar
the menu bar. |
protected ReportFactory.Table |
m_ReportTable
the report table. |
protected int |
m_Result
the result (ok or cancel). |
protected BaseSplitPane |
m_SplitPane
the split pane. |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
PixelSelectorPanel()
|
|
| Method Summary | |
|---|---|
void |
addActionListener(ActionListener l)
Adds a listener for button actions. |
void |
addImageOverlay(ImageOverlay io)
Adds the image overlay. |
void |
cleanUp()
Cleans up data structures, frees up memory. |
void |
clearImageOverlays()
Removes all image overlays. |
protected void |
closeDialog(int result)
Closes the dialog. |
protected void |
editOverlays()
Edits the current overlays. |
AbstractPixelSelectorAction[] |
getActions()
Returns the available popup actions. |
JPopupMenu |
getCustomPopupMenu(MouseEvent e)
Creates a popup menu for the given mouse event. |
AbstractImage |
getImage()
Returns the current image. |
Object |
getLastActionResult(Class cls)
Retrieves the previous result for the specified action if available. |
JMenuBar |
getMenuBar()
Creates a menu bar (singleton per panel object). |
int |
getResult()
Returns the current result. |
int |
getSplitterPosition()
Returns the current location of the splitter/divider. |
boolean |
hasImage()
Checks whether an image is currently displayed. |
boolean |
hasLastActionResult(Class cls)
Checks for the specified action whether a previous result is available. |
Iterator<ImageOverlay> |
imageOverlays()
Returns an iterator over all the image overlays. |
protected void |
initGUI()
Initializes the widgets. |
protected void |
initialize()
Initializes the members. |
protected void |
notifyActionListeners(int button)
Notifies all the action listeners. |
void |
removeActionListener(ActionListener l)
Removes a listener for button actions. |
void |
removeImageOverlay(ImageOverlay io)
Removes the image overlay. |
void |
setActions(AbstractPixelSelectorAction[] value)
Sets the available popup actions. |
void |
setImage(AbstractImage value)
Sets the image. |
void |
setLastActionResult(Class cls,
Object value)
Stores the result for the specified action. |
void |
setSplitterPosition(int value)
Sets the location of the splitter/divider. |
void |
tableChanged(TableModelEvent e)
Whenever the data in the report changes. |
void |
update()
Updates the report/image. |
void |
updateImage()
Updates the image. |
void |
updateReport()
Updates the report. |
| Methods inherited from class adams.gui.core.BasePanel |
|---|
afterHide, afterShow, beforeHide, beforeShow, closeParent, finishInit, getParentChild, getParentDialog, getParentFrame, getParentInternalFrame, getParentTitle, main, setParentTitle, setVisible |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int CANCEL_OPTION
public static final int APPROVE_OPTION
protected AbstractImage m_Image
protected BaseSplitPane m_SplitPane
protected ImagePanel m_ImagePanel
protected ReportFactory.Table m_ReportTable
protected JButton m_ButtonOK
protected JButton m_ButtonCancel
protected int m_Result
protected HashSet<ActionListener> m_ActionListeners
protected AbstractPixelSelectorAction[] m_Actions
protected JMenuBar m_MenuBar
protected Hashtable<Class,Object> m_LastActionResult
| Constructor Detail |
|---|
public PixelSelectorPanel()
| Method Detail |
|---|
protected void initialize()
initialize in class BasePanelprotected void initGUI()
initGUI in class BasePanelpublic void setSplitterPosition(int value)
value - the position in pixelspublic int getSplitterPosition()
public void setActions(AbstractPixelSelectorAction[] value)
value - the actionspublic AbstractPixelSelectorAction[] getActions()
public void setImage(AbstractImage value)
value - the imagepublic boolean hasImage()
public AbstractImage getImage()
public void addActionListener(ActionListener l)
l - the lister to addpublic void removeActionListener(ActionListener l)
l - the lister to removeprotected void notifyActionListeners(int button)
button - the button that triggered this event (OK/Cancel)public void clearImageOverlays()
public void addImageOverlay(ImageOverlay io)
io - the image overlay to addpublic void removeImageOverlay(ImageOverlay io)
io - the image overlay to removepublic Iterator<ImageOverlay> imageOverlays()
protected void closeDialog(int result)
result - whether successful or notAPPROVE_OPTION,
CANCEL_OPTIONprotected void editOverlays()
public boolean hasLastActionResult(Class cls)
cls - the action class to check
public void setLastActionResult(Class cls,
Object value)
cls - the action class to store the result forvalue - the action result, null removes the associationpublic Object getLastActionResult(Class cls)
cls - the action class to get the result for
public int getResult()
APPROVE_OPTION,
CANCEL_OPTIONpublic JPopupMenu getCustomPopupMenu(MouseEvent e)
getCustomPopupMenu in interface CustomPopupMenuProvidere - the event that triggered the request
public JMenuBar getMenuBar()
getMenuBar in interface MenuBarProviderpublic void updateReport()
public void updateImage()
public void update()
public void tableChanged(TableModelEvent e)
tableChanged in interface TableModelListenere - the table eventupdateImage()public void cleanUp()
cleanUp in interface CleanUpHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||