ilog.views.diagrammer.application
Class IlvDiagrammerPropertySheet

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by ilog.views.diagrammer.application.IlvDiagrammerPropertySheet
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class IlvDiagrammerPropertySheet
extends JPanel

A component to view and edit the properties of the selected object in a diagram component, IlvDiagrammer. The properties are displayed in a table, each row representing one property, the left column is the property name and the right column is the property value.

This component connects itself automatically to the "current" diagram component in a component hierarchy. All you have to do is create the property sheet and add it to a hierarchy that also contains one or more diagram components.

Styling Options

The rendering and the behavior of the property sheet can be customized through the style sheet of the diagram component. To do this, you must call setStyleApplicationComponents(true) on the diagram component, and you must define special rules with the "DiagrammerPropertySheet" pseudo-class, like the following:

 node:DiagrammerPropertySheet {
     background : "lightblue";
 }
 
Like in the diagram itself, you can style the property sheet according to the different kinds of nodes and links, for example:
 node[state="Error"]:DiagrammerPropertySheet {
     background : "red";
 }
 
You can style each row of the property sheet individually. To do this, use the name of the property as an additional pseudo-class, for example:
 node:DiagrammerPropertySheet:x {
     background : "lightgreen";
 }
 
You can also use the following additional pseudo-classes: The properties that can be set in the property sheet rules are:

See Also:
Serialized Form

Nested Class Summary
 class IlvDiagrammerPropertySheet.PropertySheetDelegateBeanInfo
          Bean info class
 
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.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 
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
IlvDiagrammerPropertySheet()
          Creates a new JViews Diagrammer property sheet with the default resource bundle "ilog.views.diagrammer.application.psheet".
IlvDiagrammerPropertySheet(ResourceBundle bundle)
          Creates a new JViews Diagrammer property sheet with the specified resource bundle.
 
Method Summary
 void addNotify()
           
 void addTargetPropertyChangeListener(PropertyChangeListener listener)
          Add a listener that will be notified of the target modifications
static void allowUserDefinedType(boolean allowed)
          Lets you install or not the action that lets the user to set the user-defined type for the selected object.
 IlvDiagrammer getDiagrammer()
          Returns the diagram component to which this component is currently attached.
 Icon getIcon()
          Returns the icon to be used when this component is displayed in a frame.
 JTable getTable()
          Returns the JTable used by the property sheet.
protected  Object getTargetObject()
          Returns the target object.
 String getTitle()
          Returns the title to be used when this component is displayed in a frame.
 IlvDiagrammerToolBar getToolbar()
          Returns the toolbar of the property sheet.
 void removeNotify()
           
 void removeTargetPropertyChangeListener(PropertyChangeListener listener)
          Removes a target property change listener.
 void setDiagrammer(IlvDiagrammer diagrammer)
          Sets the diagram component to which this component is attached.
 void setTarget(Object target)
          Sets the object that is currently edited by the property sheet.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, 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, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IlvDiagrammerPropertySheet

public IlvDiagrammerPropertySheet()
Creates a new JViews Diagrammer property sheet with the default resource bundle "ilog.views.diagrammer.application.psheet".


IlvDiagrammerPropertySheet

public IlvDiagrammerPropertySheet(ResourceBundle bundle)
Creates a new JViews Diagrammer property sheet with the specified resource bundle.

Method Detail

allowUserDefinedType

public static void allowUserDefinedType(boolean allowed)
Lets you install or not the action that lets the user to set the user-defined type for the selected object.

Since:
JViews 7.5

addNotify

public void addNotify()
Overrides:
addNotify in class JComponent

removeNotify

public void removeNotify()
Overrides:
removeNotify in class JComponent

getToolbar

public IlvDiagrammerToolBar getToolbar()
Returns the toolbar of the property sheet.


setTarget

public void setTarget(Object target)
Sets the object that is currently edited by the property sheet.

Normally, the target object is set automatically when you select an object in the diagram component to which the property sheet is attached. You may call this method if you want to edit the properties of an object that is not select in the diagram.

Parameters:
target - An object contained in the data model of the diagram component to which the property sheet is attached. May be null.

getTable

public JTable getTable()
Returns the JTable used by the property sheet.


getDiagrammer

public IlvDiagrammer getDiagrammer()
Returns the diagram component to which this component is currently attached.


setDiagrammer

public void setDiagrammer(IlvDiagrammer diagrammer)
Sets the diagram component to which this component is attached.

You do not usually need to call this method, because this component is attached automatically to the current diagram component of the Swing hierarchy.

Parameters:
diagrammer - The new diagram component to which this component is attached.

getTargetObject

protected Object getTargetObject()
Returns the target object.

Returns:
target object

getTitle

public String getTitle()
Returns the title to be used when this component is displayed in a frame.


getIcon

public Icon getIcon()
Returns the icon to be used when this component is displayed in a frame.


addTargetPropertyChangeListener

public void addTargetPropertyChangeListener(PropertyChangeListener listener)
Add a listener that will be notified of the target modifications

Since:
JViews 7.5

removeTargetPropertyChangeListener

public final void removeTargetPropertyChangeListener(PropertyChangeListener listener)
Removes a target property change listener.



Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.