|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.JPanel
|
+--arlut.csd.ganymede.client.vectorPanel
A GUI vector panel that is designed to be placed inside a
containerPanel within the client.
This vector panel is intended to support vectors of discrete GUI components that
are mapped to elements in a server-side vector db_field,
but right now it only supports IP Address fields and edit-in-place
containerPanels. Most of the code in this class is dedicated to handling
vectors of embedded containerPanels.
Whatever sort of GUI components/database elements this vectorPanel is managing,
all GUI components will be wrapped by
elementWrapper's, which are responsible
for hiding and revealing the GUI component on the user's command.
vectorPanel handles communications with the server to manage the server-side db_field.
elementWrapper,
containerPanel,
invid_field,
ip_field,
Serialized Form| Field Summary | |
(package private) javax.swing.JButton |
addB
Button used to add a new element to the vector |
(package private) javax.swing.JPanel |
centerPanel
centerPanel holds all of the elementWrappers in a BoxLayout |
(package private) boolean |
centerPanelAdded
|
(package private) javax.swing.JMenuItem |
closeAllMI
|
(package private) javax.swing.JMenuItem |
closeLevelMI
|
(package private) java.util.Vector |
compVector
Vector of GUI components held in this vectorPanel. |
(package private) arlut.csd.ganymede.client.containerPanel |
container
Reference to the containerPanel that we are embedded in. |
(package private) boolean |
debug
|
(package private) boolean |
editable
|
(package private) java.util.Hashtable |
ewHash
Hash mapping GUI components added to this vectorPanel to the elementWrappers holding them. |
(package private) javax.swing.JMenuItem |
expandAllMI
|
(package private) javax.swing.JMenuItem |
expandLevelMI
|
(package private) arlut.csd.ganymede.client.gclient |
gc
Reference to the client's main class. |
(package private) boolean |
isCreating
|
(package private) boolean |
isEditInPlace
|
private arlut.csd.ganymede.db_field |
my_field
Reference to server-side vector invid_field or
ip_field. |
private java.lang.Boolean |
myFieldIsEditable
Boolean to track editability status of the vector field we are connected to. |
(package private) java.lang.String |
name
The name of the invid field we are managing |
(package private) javax.swing.JPopupMenu |
popupMenu
Pop-up menu appears when you right-click anywhere inside the panel |
(package private) arlut.csd.ganymede.FieldTemplate |
template
|
protected arlut.csd.ganymede.client.windowPanel |
wp
Reference to the desktop pane containing the client's internal windows. |
| Fields inherited from class javax.swing.JPanel |
|
| 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.Container |
|
| 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 | |
vectorPanel(arlut.csd.ganymede.db_field field,
arlut.csd.ganymede.FieldTemplate template,
arlut.csd.ganymede.client.windowPanel parent,
boolean editable,
boolean isEditInPlace,
arlut.csd.ganymede.client.containerPanel container,
boolean isCreating)
Constructor |
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
|
void |
addElement(java.awt.Component c)
Adds a new element to the vectorPanel. |
void |
addElement(java.awt.Component c,
boolean invalidateNow)
Adds a new element to the vectorPanel. |
void |
addElement(java.lang.String title,
java.awt.Component c)
Adds a new element to the vectorPanel. |
void |
addElement(java.lang.String title,
java.awt.Component c,
boolean expand)
Adds a new element to the vectorPanel. |
void |
addElement(java.lang.String title,
java.awt.Component c,
boolean expand,
boolean invalidateNow)
Add a new element to the vectorPanel. |
void |
addNewElement()
Creates a new element in the vector db_field
this vectorPanel is connected to. |
boolean |
changeElement(java.lang.Object obj,
short index)
Server dispatch method for value change messages passed us by elementWrappers. |
void |
closeLevels(boolean recursive)
Close all the levels |
private void |
createVectorComponents()
Talks to the server and populates this vectorPanel with elements corresponding to values held in my_field. |
void |
deleteElement(arlut.csd.ganymede.client.elementWrapper ew)
Removes an element from the vector panel. |
void |
expandAllLevels()
Expand all the levels. |
void |
expandLevels(boolean recursive)
Expands all closed elementWrappers in this vectorPanel |
boolean |
isFieldEditable()
Returns true if the vector field we are connected to is editable. |
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
Pop-up menu dispatch. |
void |
mouseReleased(java.awt.event.MouseEvent e)
|
void |
refresh()
Refreshes the vectorPanel. |
void |
run()
This just calls expandAllLevels.. |
private void |
setNormalCursor()
|
private void |
setStatus(java.lang.String status)
|
boolean |
setValuePerformed(arlut.csd.JDataComponent.JValueObject v)
JsetValueCallback implementation method. |
private void |
setWaitCursor()
|
private void |
showErrorMessage(java.lang.String message)
|
private void |
showPopupMenu(int x,
int y)
|
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
boolean debug
java.util.Vector compVector
private java.lang.Boolean myFieldIsEditable
java.lang.String name
java.util.Hashtable ewHash
javax.swing.JButton addB
javax.swing.JPanel centerPanel
boolean editable
boolean isEditInPlace
boolean centerPanelAdded
private arlut.csd.ganymede.db_field my_field
invid_field or
ip_field. This vectorPanel will communicate
with the Ganymede server using this reference to make changes to the vector field.
protected arlut.csd.ganymede.client.windowPanel wp
arlut.csd.ganymede.client.containerPanel container
arlut.csd.ganymede.client.gclient gc
javax.swing.JPopupMenu popupMenu
javax.swing.JMenuItem closeLevelMI
javax.swing.JMenuItem expandLevelMI
javax.swing.JMenuItem closeAllMI
javax.swing.JMenuItem expandAllMI
boolean isCreating
arlut.csd.ganymede.FieldTemplate template
| Constructor Detail |
public vectorPanel(arlut.csd.ganymede.db_field field,
arlut.csd.ganymede.FieldTemplate template,
arlut.csd.ganymede.client.windowPanel parent,
boolean editable,
boolean isEditInPlace,
arlut.csd.ganymede.client.containerPanel container,
boolean isCreating)
field - db_field for this vectorPanelparent - windowPanel above this vectorPaneleditable - True if field is editableisEditInPlace - True if object is editInPlace. If this is false, it will make a vector of IPFields.container - containerPanel this vectorPanel is in| Method Detail |
private void showPopupMenu(int x,
int y)
private void createVectorComponents()
Talks to the server and populates this vectorPanel with elements corresponding to values held in my_field. Only called on vectorPanel construction.
public void addNewElement()
Creates a new element in the vector db_field
this vectorPanel is connected to. Creates and adds the GUI component for the new
element to the vectorPanel.
This is called when the add button is clicked, but there is no reason why it couldn't be called from other places if you wanted to add a new element.
public void addElement(java.awt.Component c)
Adds a new element to the vectorPanel.
This element gets the default title, and will not be opened in expanded form.
The vectorPanel will be revalidated to trigger a GUI refresh after this element is added.
c - Component to be added
public void addElement(java.awt.Component c,
boolean invalidateNow)
Adds a new element to the vectorPanel.
This element gets the default title, and will not be expanded immediately.
c - Component to be addedinvalidateNow - If true, invalidate()/validate() will be called.
When adding several components all at once, set this to false.
public void addElement(java.lang.String title,
java.awt.Component c)
Adds a new element to the vectorPanel.
The vectorPanel will be revalidated to trigger a GUI refresh after this element is added.
title - String used in the "title" of the elementWrapperc - Component to be added
public void addElement(java.lang.String title,
java.awt.Component c,
boolean expand)
Adds a new element to the vectorPanel.
This element will be immediately expanded if <expand> is true.
The vectorPanel will be revalidated to trigger a GUI refresh after this element is added.
title - String used in the "title" of the elementWrapperc - Component to be addedexpand - If true, the element will appear pre-opened
public void addElement(java.lang.String title,
java.awt.Component c,
boolean expand,
boolean invalidateNow)
title - String used in the "title" of the elementWrapperc - Component to be addedexpand - If true, the elementWrapper will be expanded immediately after creationinvalidateNow - If true, invalidate()/validate() will be called.
When adding several components all at once, set this to false.public void deleteElement(arlut.csd.ganymede.client.elementWrapper ew)
ew - Component to be removed.public void refresh()
Refreshes the vectorPanel.
This will refresh every containerPanel and IPField in this vectorPanel, and will add or remove entries as needed to bring this vectorPanel into synchronization with the field on the server that this vectorPanel is attached to.
New containerPanel elements will always be added to the end of the vector.. we aren't worried about the order of the vector we're handling, just the values and the proper association between the GUI component and the server field.
public void expandAllLevels()
public void expandLevels(boolean recursive)
Expands all closed elementWrappers in this vectorPanel
recursive - If true, it will expand any vector panels inside
the containerPanels in this vectorPanel as well. The current
implementation opens up each level with a separate thread, which
may well not be the best way of doing this from a performance/safety
perspective.public void run()
run in interface java.lang.Runnablepublic void closeLevels(boolean recursive)
recursive - If true, close all vectorPanels inside this
vectorPanel. This one never spawns another thread.public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerpublic boolean setValuePerformed(arlut.csd.JDataComponent.JValueObject v)
JsetValueCallback implementation method. Any elementWrappers we contain will talk to us using this method, to notify us of element deletion and to pass information to us about IP field value changes.
setValuePerformed in interface JsetValueCallback
public boolean changeElement(java.lang.Object obj,
short index)
throws java.rmi.RemoteException
Server dispatch method for value change messages passed us by elementWrappers.
Currently used only for IP fields, as embedded containerPanels communicate their field changes directly to the server.
java.rmi.RemoteExceptionpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenerpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerprivate final void setStatus(java.lang.String status)
private final void setNormalCursor()
private final void setWaitCursor()
private final void showErrorMessage(java.lang.String message)
public boolean isFieldEditable()
Returns true if the vector field we are connected to is editable.
This method will call the server to query the field the first time it is called. It will return the cached result thereafter.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||