org.ceryle.ui.graph
Class FacetPanel
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.ceryle.ui.graph.FacetPanel
- All Implemented Interfaces:
- ImageObserver, MenuContainer, Serializable, Accessible
public class FacetPanel
- extends JPanel
Extends JPanel to provided a panel for navigating among the nodes
connected to the current one, either up, down, or in any direction.
- Since:
- JDK1.3
- Version:
- $Id: FacetPanel.java,v 3.13 2007-06-20 01:28:21 altheim Exp $
- Author:
- Murray Altheim
- See Also:
- Serialized Form
|
Method Summary |
protected void |
addFacet(ActionEvent event)
Add a new facet to the current Topic. |
protected void |
addProperty()
Add a new facet property (Occurrence) with empty content to the current facet (Topic). |
void |
clearFacets()
Clear all property-related content. |
void |
clearProperties()
Clear all property-related content. |
Set |
getFacetPropertyTypes()
Returns the list of facet property types (Topics) for the current facet. |
protected ValueManager |
getValueManager()
Returns the ValueManager used by this FacetPanel. |
boolean |
isDirty()
Returns true if any changes have been made to the Topic's facets. |
void |
registerDatatypes()
A StringValuePanel is registered as the default panel for editing
content with the ValueManager upon creation. |
protected void |
removeFacet(ActionEvent event)
Remove the currently-selected facet from the current Topic. |
protected void |
removeProperty()
Remove the current property (an Occurrence) from the current facet (a Topic). |
protected boolean |
saveProperty()
Saves the current content of the JTextArea to the Topic Map,
returning true if the save was either unnecessary or successful. |
void |
setCurrentTNode(TNode tnode)
Sets the current TNode to tnode, updating as necessary. |
protected void |
setEditable(boolean editable)
Enable or disable all editing features. |
protected void |
setFacetMode()
Sets the mode between showing the facets of the current
Topic and showing which Topics it plays a role as a facet. |
protected void |
updateComment()
Updates the comment. |
protected void |
viewFacet(Topic facet)
View the Topic facet by populating the 'facet property' popup menu,
and selecting a default property, "Default Facet Value". |
protected void |
viewProperty(Occurrence property)
View the Occurrence property by displaying its content in the text area. |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, 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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, 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, update |
| Methods inherited from class java.awt.Container |
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, 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, 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, hide, 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, transferFocusUpCycle |
dirty
protected boolean dirty
- Indicates that an editing action has occurred in the text area.
inTransition
protected boolean inTransition
- Indicates that the panel is in a transitional state.
m_editable
protected boolean m_editable
- Indicates that editing features are enabled.
m_parent
protected Container m_parent
centerPanel
protected JPanel centerPanel
southPanel
protected JPanel southPanel
FacetPanel
public FacetPanel(TopicEditorDialog dialog,
JLabel comment)
- Constructor for a FacetPanel with reference to the parent TopicEditorDialog.
- Parameters:
dialog - the parent TopicEditorDialog box
isDirty
public boolean isDirty()
- Returns true if any changes have been made to the Topic's facets.
registerDatatypes
public void registerDatatypes()
- A StringValuePanel is registered as the default panel for editing
content with the ValueManager upon creation. This method registers
other ValuePanel implementations for String.enumeration, Boolean,
Date, and DateTime datatypes. This method can be extended to add more,
otherwise, use
getValueManager() to perform this directly
using the ValueManager.
Note: currently, only Date and DateTime are actually supported.
setCurrentTNode
public void setCurrentTNode(TNode tnode)
- Sets the current TNode to tnode, updating as necessary.
viewFacet
protected void viewFacet(Topic facet)
- View the Topic facet by populating the 'facet property' popup menu,
and selecting a default property, "Default Facet Value".
addFacet
protected void addFacet(ActionEvent event)
- Add a new facet to the current Topic. This involves building a list
of class topics for which this facet is an instance, and superclasses
of this facet, and obtaining the list of facets from each of those
topics. A user option is to select from the graph directly.
removeFacet
protected void removeFacet(ActionEvent event)
- Remove the currently-selected facet from the current Topic.
clearFacets
public void clearFacets()
- Clear all property-related content.
viewProperty
protected void viewProperty(Occurrence property)
- View the Occurrence property by displaying its content in the text area.
saveProperty
protected boolean saveProperty()
- Saves the current content of the JTextArea to the Topic Map,
returning true if the save was either unnecessary or successful.
This refreshes the UI list.
(m_currentProperty should already be set to the new property
prior to calling.)
addProperty
protected void addProperty()
- Add a new facet property (Occurrence) with empty content to the current facet (Topic).
removeProperty
protected void removeProperty()
- Remove the current property (an Occurrence) from the current facet (a Topic).
clearProperties
public void clearProperties()
- Clear all property-related content.
getValueManager
protected ValueManager getValueManager()
- Returns the ValueManager used by this FacetPanel. This can be used to register new
datatype-handling panels that follow the
ValuePanel API.
setEditable
protected void setEditable(boolean editable)
- Enable or disable all editing features.
setFacetMode
protected void setFacetMode()
- Sets the mode between showing the facets of the current
Topic and showing which Topics it plays a role as a facet.
(currently unimplemented)
getFacetPropertyTypes
public Set getFacetPropertyTypes()
- Returns the list of facet property types (Topics) for the current facet.
updateComment
protected void updateComment()
- Updates the comment. A facetCount value of -1 indicates no loaded Topic.
The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.