public class ManagerPanel extends JPanel implements IManagerPanel, MouseListener, ActionListener, ChangeListener, ListSelectionListener
JPanel.AccessibleJPanelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategylistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWaccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
ManagerPanel()
This is the default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(ActionEvent e) |
void |
confirmDeletionOfItems(int[] idxs)
Shows a confirm dialog for deleting selected indices.
|
private void |
createAndAssemble()
This method initializes the content and returns
|
private void |
createButtonGroupMain() |
private JCheckBox |
createChbxAutoPreview()
This method initializes chbxAutoPreview
|
private JCheckBox |
createChbxTogglePreview()
This method initializes chbxTogglePreview
|
private JSlider |
createItemSlider() |
private JLabel |
createJLabelItemNr() |
private JList |
createManagerListLeft()
This method initializes managerListLeft
|
private JList |
createManagerListRight()
This method initializes managerListRight
|
private JPanel |
createToggleStatusPanel() |
JButton |
getBtnExport() |
int[] |
getCurrMgrIdxs()
Get the currently selected manager indices.
|
int |
getIndexForDisplay()
Gets the current index for display.
|
JSlider |
getItemSlider()
Gets the scroll bar for scrolling through the item numbers.
|
JRadioButton |
getJRadioButtonMainLeft()
Gets the radio button for the left manager list.
|
JRadioButton |
getJRadioButtonMainRight()
Gets the radio button for the right manager list.
|
JLabel |
getLabelItemNr()
Gets the label for the scroll bar.
|
JLabel |
getLblTankIndexLeft() |
JLabel |
getLblTankIndexRight() |
JLabel |
getLblVirtualIconLeft() |
JLabel |
getLblVirtualIconRight() |
JList |
getManagerListLeft()
Gets the GUI element for the left manager list.
|
JList |
getManagerListRight()
Gets the GUI element for the right manager list.
|
DefaultListModel |
getManagerModelLeft()
Gets the model of the left manager list.
|
DefaultListModel |
getManagerModelRight()
Gets the model of the right manager list.
|
protected void |
handleExportAction(ActionEvent e)
This method determines the currently selected manager items and exports
them to either a new stack or to new single items in the tank list.
|
void |
hideVirtualIconLeft() |
void |
hideVirtualIconRight() |
boolean |
isCheckBoxAutoPreviewSelected()
Check if the auto preview check box is selected.
|
boolean |
isCheckBoxMainLeftSelected()
Check if the "hide/show thumbnails" check box of the left manager list is
selected.
|
boolean |
isCheckBoxMainRightSelected()
Check if the "hide/show thumbnails" check box of the right manager list
is selected.
|
boolean |
isCheckBoxTogglePreviewSelected()
Check if the toggle preview check box is selected.
|
boolean |
isRadioButtonMainLeftSelected()
Check if the left manager is selected.
|
boolean |
isRadioButtonMainRightSelected()
Check if the right manager is selected.
|
void |
mouseClicked(MouseEvent e) |
void |
mouseEntered(MouseEvent e) |
void |
mouseExited(MouseEvent e) |
void |
mousePressed(MouseEvent e) |
void |
mouseReleased(MouseEvent e) |
private void |
performAutoPreview() |
void |
removeSelectedItems(int[] idxs,
int list)
Remove selected indices from one of the two manager lists.
|
void |
resetItemSlider() |
void |
resetTogglePreviewIfRunning()
This method resets the toggle preview
|
void |
selectAll()
Selects all items in the currently activated list.
|
void |
setCurrMgrIdxs(int[] currMgrIdxs)
Set the currently selected manager indices.
|
void |
setIndexForDisplay(int indexForDisplay)
Sets the current index for display.
|
void |
setManagerForIndex(int index)
This is a convenient wrapper method for setting single items in a manager
list.
|
void |
setManagerForIndex(int[] indices,
int indexForDisplay)
Sets the manager's selection model according to the user's input on the
JList. |
void |
setRadioButtonMainLeft(boolean b)
De-/activates the left manager list.
|
void |
setRadioButtonMainRight(boolean b)
De-/activates the right manager list.
|
void |
setSliderValues(int mgrIndex,
int nItems) |
void |
setTabForDataBoxType(DataType dataType) |
void |
showVirtualIconLeft() |
void |
showVirtualIconRight() |
void |
startTogglePreviewIfSelected()
This method toggles the preview between the processed and the original
image (e.g.
|
void |
stateChanged(ChangeEvent e) |
void |
updateOperatorGUI()
This method updates any operator GUI, if it is opened.
|
int[] |
updateWorkPackage(int[] currMgrIdxs,
int[] targetMgrIdxs)
This method updates the work package of any open operator.
|
void |
valueChanged(ListSelectionEvent e) |
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, 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, transferFocusUpCycleprivate static final long serialVersionUID
private static Class<?> caller
private static final org.apache.log4j.Logger logger
public static final int MANAGER_LIST_LEFT
public static final int MANAGER_LIST_RIGHT
private JPanel managerContentPanel
private JPanel controlsPanel
private JPanel listPanel
private ScrollablePanel managerListContainerLeft
private ScrollablePanel managerListContainerRight
private JCheckBox chbxAutoPreview
private JCheckBox chbxTogglePreview
private JLabel lblItemNr
private JSlider itemSlider
private DefaultListModel managerModelLeft
private JList managerListLeft
private DefaultListModel managerModelRight
private JList managerListRight
private ExecutorService execToggle
private JRadioButton radbutMainLeft
private JRadioButton radbutMainRight
private ButtonGroup buttGroupMain
private JCheckBox chbxMainLeft
private JCheckBox chbxMainRight
private JPanel toggleStatusPanel
private int[] currMgrIdxs
private int indexForDisplay
private ArrayListTransferHandler alHandlerLeft
ArrayListTransferHandler for the left manager list, enabling
drag&drop gestures.private ArrayListTransferHandler alHandlerRight
ArrayListTransferHandler for the right manager list, enabling
drag&drop gestures.private JButton btnExport
private JLabel lblTankIndexLeft
private JLabel lblTankIndexRight
private JPanel panel_Left
private JPanel panel_Right
private JLabel lblVirtualIconLeft
private JLabel lblVirtualIconRight
private JPanel mainControlsLeft
private JPanel mainControlsRight
private void createAndAssemble()
protected void handleExportAction(ActionEvent e)
The user is prompted for the export type.
e - private JLabel createJLabelItemNr()
private JPanel createToggleStatusPanel()
private JCheckBox createChbxAutoPreview()
private JCheckBox createChbxTogglePreview()
private void createButtonGroupMain()
private JList createManagerListLeft()
public void confirmDeletionOfItems(int[] idxs)
idxs - public void removeSelectedItems(int[] idxs,
int list)
idxs - the indices to be deletedlist - the integer identifier of the list, MANAGER_LIST_LEFT
=0 is the left list, or
MANAGER_LIST_RIGHT=1 if it
is the right listArrayIndexOutOfBoundsException - if the list contains less items than specified for deletionprivate JList createManagerListRight()
private JSlider createItemSlider()
public void startTogglePreviewIfSelected()
startTogglePreviewIfSelected in interface IManagerPanelpublic void resetTogglePreviewIfRunning()
resetTogglePreviewIfRunning in interface IManagerPanelpublic void setManagerForIndex(int index)
throws NullPointerException,
Exception
IManagerPanelsetManagerForIndex in interface IManagerPanelindex - the index to be selectedNullPointerExceptionExceptionpublic void setManagerForIndex(int[] indices,
int indexForDisplay)
throws NullPointerException,
Exception
IManagerPanelJList.setManagerForIndex in interface IManagerPanelindices - all selected indices from the JListindexForDisplay - the index which will be displayed in the item panelNullPointerExceptionExceptionpublic void stateChanged(ChangeEvent e)
stateChanged in interface ChangeListenerpublic void mouseClicked(MouseEvent e)
mouseClicked in interface MouseListenerpublic void mouseEntered(MouseEvent e)
mouseEntered in interface MouseListenerpublic void mouseExited(MouseEvent e)
mouseExited in interface MouseListenerpublic void mousePressed(MouseEvent e)
mousePressed in interface MouseListenerpublic int[] updateWorkPackage(int[] currMgrIdxs,
int[] targetMgrIdxs)
The sources are validated by the custom operator validator and the source indices are updated on success. If the validation fails, the sources will not be altered and remain unchanged.
currMgrIdxs - all currently selected manager indicestargetMgrIdxs - the target indicespublic void updateOperatorGUI()
public void mouseReleased(MouseEvent e)
mouseReleased in interface MouseListenerpublic void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenerprivate void performAutoPreview()
public void valueChanged(ListSelectionEvent e)
valueChanged in interface ListSelectionListenerpublic void resetItemSlider()
public JLabel getLabelItemNr()
IManagerPanelgetLabelItemNr in interface IManagerPanelJLabelpublic JSlider getItemSlider()
IManagerPanelgetItemSlider in interface IManagerPanelJSliderpublic DefaultListModel getManagerModelLeft()
IManagerPanelgetManagerModelLeft in interface IManagerPanelpublic JList getManagerListLeft()
IManagerPanelgetManagerListLeft in interface IManagerPanelpublic DefaultListModel getManagerModelRight()
IManagerPanelgetManagerModelRight in interface IManagerPanelpublic JList getManagerListRight()
IManagerPanelgetManagerListRight in interface IManagerPanelpublic JRadioButton getJRadioButtonMainLeft()
IManagerPanelgetJRadioButtonMainLeft in interface IManagerPanelpublic JRadioButton getJRadioButtonMainRight()
IManagerPanelgetJRadioButtonMainRight in interface IManagerPanelpublic boolean isRadioButtonMainLeftSelected()
IManagerPanelisRadioButtonMainLeftSelected in interface IManagerPaneltrue, if so, false otherwisepublic boolean isCheckBoxMainLeftSelected()
IManagerPanelisCheckBoxMainLeftSelected in interface IManagerPaneltrue, if so, false otherwisepublic boolean isRadioButtonMainRightSelected()
IManagerPanelisRadioButtonMainRightSelected in interface IManagerPaneltrue, if so, false otherwisepublic boolean isCheckBoxMainRightSelected()
IManagerPanelisCheckBoxMainRightSelected in interface IManagerPaneltrue, if so, false otherwisepublic boolean isCheckBoxAutoPreviewSelected()
IManagerPanelisCheckBoxAutoPreviewSelected in interface IManagerPaneltrue, if so, false otherwisepublic boolean isCheckBoxTogglePreviewSelected()
IManagerPanelisCheckBoxTogglePreviewSelected in interface IManagerPaneltrue, if so, false otherwisepublic int[] getCurrMgrIdxs()
IManagerPanelgetCurrMgrIdxs in interface IManagerPanelpublic void setCurrMgrIdxs(int[] currMgrIdxs)
IManagerPanelsetCurrMgrIdxs in interface IManagerPanelpublic int getIndexForDisplay()
IManagerPanelgetIndexForDisplay in interface IManagerPanelpublic void setIndexForDisplay(int indexForDisplay)
IManagerPanelsetIndexForDisplay in interface IManagerPanelpublic void setSliderValues(int mgrIndex,
int nItems)
public void setTabForDataBoxType(DataType dataType)
public void showVirtualIconLeft()
public void hideVirtualIconLeft()
public void showVirtualIconRight()
public void hideVirtualIconRight()
public JButton getBtnExport()
public JLabel getLblTankIndexLeft()
public JLabel getLblTankIndexRight()
public JLabel getLblVirtualIconRight()
public JLabel getLblVirtualIconLeft()
public void setRadioButtonMainRight(boolean b)
IManagerPanelsetRadioButtonMainRight in interface IManagerPanelb - true if the list is supposed to be active,
false otherwisepublic void setRadioButtonMainLeft(boolean b)
IManagerPanelsetRadioButtonMainLeft in interface IManagerPanelb - true if the list is supposed to be active,
false otherwisepublic void selectAll()
IManagerPanelselectAll in interface IManagerPanelCopyright © 2009–2017 Helmut Ahammer, Philipp Kainz. All rights reserved.