public class LocalEntryEditor extends JDialog
LocalAddeEntries
.Modifier and Type | Class and Description |
---|---|
private static class |
LocalEntryEditor.TooltipComboBoxRenderer
Dave's nice combobox tooltip renderer!
|
JDialog.AccessibleJDialog
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityType
Window.AccessibleAWTWindow, Window.Type
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
private LocalAddeEntry |
currentEntry |
private JTextField |
datasetField |
private String |
datasetText |
private JTextField |
directoryField |
private AddeEntry.EditorAction |
editorAction
The last dialog action performed by the user.
|
private EntryStore |
entryStore
Reference back to the server manager.
|
private JComboBox<LocalAddeEntry.AddeFormat> |
formatComboBox |
private static DefaultComboBoxModel<LocalAddeEntry.AddeFormat> |
formats
The valid local ADDE formats.
|
private TabbedAddeManager |
managerController
The server manager GUI.
|
private static String |
PROP_LAST_PATH
Property ID for the last directory selected.
|
private String |
selectedPath
Either the path to an ADDE directory as selected by the user or an empty
String . |
private JTextField |
typeField |
accessibleContext, rootPane, rootPaneCheckingEnabled
DEFAULT_MODALITY_TYPE
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
LocalEntryEditor(EntryStore entryStore,
String group)
Creates a modal local ADDE data editor.
|
LocalEntryEditor(Frame parent,
boolean modal,
TabbedAddeManager manager,
EntryStore store) |
LocalEntryEditor(Frame parent,
boolean modal,
TabbedAddeManager manager,
EntryStore store,
LocalAddeEntry entry) |
Modifier and Type | Method and Description |
---|---|
private void |
addEntry()
Creates new
LocalAddeEntry s based upon the contents of the dialog
and adds "them" to the managed servers. |
private void |
browseButtonActionPerformed(ActionEvent evt)
Triggered when the "file picker" button is clicked.
|
private void |
cancelButtonActionPerformed(ActionEvent evt)
Calls
Window.dispose() if the dialog is visible. |
private void |
editButtonActionPerformed(ActionEvent evt)
Triggered when the "edit" button is clicked.
|
private void |
editEntry() |
private String |
getDataDirectory(String startDir)
Ask the user for a data directory from which to create a MASK=
|
AddeEntry.EditorAction |
getEditorAction()
Returns the last
AddeEntry.EditorAction that was performed. |
private String |
getLastPath()
Returns the value of the
PROP_LAST_PATH McIDAS-V property. |
private void |
initComponents(LocalAddeEntry initEntry)
Creates the editor dialog and initializes the various GUI components.
|
private Set<LocalAddeEntry> |
pollWidgets(boolean newEntry)
Poll the various UI components and attempt to construct valid ADDE
entries based upon the information provided by the user.
|
private void |
saveButtonActionPerformed(ActionEvent evt)
Triggered when the "add" button is clicked.
|
void |
setLastPath(String path)
Sets the value of the
PROP_LAST_PATH McIDAS-V property to be
the contents of path . |
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, setVisible, show, toBack
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFront
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
private static final String PROP_LAST_PATH
private static final DefaultComboBoxModel<LocalAddeEntry.AddeFormat> formats
private final TabbedAddeManager managerController
null
.private final EntryStore entryStore
private final LocalAddeEntry currentEntry
private String selectedPath
String
.private AddeEntry.EditorAction editorAction
private final String datasetText
private JTextField datasetField
private JTextField directoryField
private JComboBox<LocalAddeEntry.AddeFormat> formatComboBox
private JTextField typeField
public LocalEntryEditor(EntryStore entryStore, String group)
entryStore
- The server manager. Should not be null
.group
- Name of the group/dataset containing the desired data. Be aware that null
is okay.public LocalEntryEditor(Frame parent, boolean modal, TabbedAddeManager manager, EntryStore store)
public LocalEntryEditor(Frame parent, boolean modal, TabbedAddeManager manager, EntryStore store, LocalAddeEntry entry)
private void initComponents(LocalAddeEntry initEntry)
initEntry
- Use LocalAddeEntry.INVALID_ENTRY
to specify
that the user is creating a new entry; otherwise provide the actual
entry that the user is editing.private void saveButtonActionPerformed(ActionEvent evt)
evt
- Ignored.private void editButtonActionPerformed(ActionEvent evt)
evt
- Ignored.private void browseButtonActionPerformed(ActionEvent evt)
evt
- Ignored.private String getLastPath()
PROP_LAST_PATH
McIDAS-V property.String
representation of the last path
selected by the user, or an empty String
.public void setLastPath(String path)
PROP_LAST_PATH
McIDAS-V property to be
the contents of path
.path
- New value for PROP_LAST_PATH
. null
will be
converted to an empty String
.private void cancelButtonActionPerformed(ActionEvent evt)
Window.dispose()
if the dialog is visible.evt
- Ignored.private Set<LocalAddeEntry> pollWidgets(boolean newEntry)
newEntry
- a boolean, true
if we are adding a new entry.Set
of entries that represent the user's input, or an
empty Set
if the input was somehow invalid.private void addEntry()
LocalAddeEntry
s based upon the contents of the dialog
and adds "them" to the managed servers. If the dialog is
displayed, we call Window.dispose()
and attempt to refresh the
server manager GUI if it is available.private void editEntry()
private String getDataDirectory(String startDir)
startDir
- If this is a valid path, then the file picker will
(presumably) use that as its initial location. Should not be
null
?startDir
.public AddeEntry.EditorAction getEditorAction()
AddeEntry.EditorAction
that was performed.editorAction