ilog.views.diagrammer.application
Class IlvDiagrammerTable

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.IlvDiagrammerTable
All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

public class IlvDiagrammerTable
extends JPanel
implements ActionListener

A component to display the data model of an IlvDiagrammer as a table.

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

The table displays all the objects of a given type in the data model. A combo box lets you choose which objects are displayed. Each row in the table represents an object; each column represents a property.

This component differs from the IlvDiagrammerPropertySheet in that it displays a set of objects in a single view, while the property sheet displays the properties of a single object.

Styling Options

The rendering and the behavior of the table 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 "DiagrammerTable" pseudo-class, like the following:

 node:DiagrammerTable {
     background : "lightblue";
 }
 
Like in the diagram itself, you can style each row in the table according to the different kinds of nodes and links, for example:
 node[state="Error"]:DiagrammerTable {
     background : "red";
 }
 
You can style each column of the table individually. To do this, use the name of the property displayed in the column as an additional pseudo-class, for example:
 node:DiagrammerTable:x {
     background : "lightgreen";
 }
 
You can also use the following additional pseudo-classes: The properties that can be set in the property sheet rules are all the properties of the javax.swing.table.DefaultTableCellRenderer class (which is a subclass of javax.swing.JLabel). The most useful properties are typically foreground, background font and icon.

See Also:
Serialized Form

Nested Class Summary
 
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
IlvDiagrammerTable()
          Creates a new JViews Diagrammer table with the default resource bundle "ilog.views.diagrammer.application.table".
IlvDiagrammerTable(ResourceBundle bundle)
          Creates a new JViews Diagrammer table with the specified resource bundle.
 
Method Summary
 void actionPerformed(ActionEvent e)
          Implementation of the ActionListener interface.
 void addNotify()
           
 JComboBox getCombo()
          Returns the combo box displayed above the table.
 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.
 IlvSDMTableMediator getMediator()
          Returns the object that is used internally to connect the table to the data model.
 JTable getTable()
          Returns the JTable that displays the data model.
 String getTitle()
          Returns the title to be used when this component is displayed in a frame.
 IlvDiagrammerToolBar getToolbar()
          Returns the toolbar displayed above the table.
 void removeNotify()
           
 void setDiagrammer(IlvDiagrammer diagrammer)
          Sets the diagram component to which this component is attached.
 
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

IlvDiagrammerTable

public IlvDiagrammerTable(ResourceBundle bundle)
Creates a new JViews Diagrammer table with the specified resource bundle.


IlvDiagrammerTable

public IlvDiagrammerTable()
Creates a new JViews Diagrammer table with the default resource bundle "ilog.views.diagrammer.application.table".

Method Detail

addNotify

public void addNotify()
Overrides:
addNotify in class JComponent

removeNotify

public void removeNotify()
Overrides:
removeNotify in class JComponent

getCombo

public JComboBox getCombo()
Returns the combo box displayed above the table.


getMediator

public IlvSDMTableMediator getMediator()
Returns the object that is used internally to connect the table to the data model.


getTable

public JTable getTable()
Returns the JTable that displays the data model.


getToolbar

public IlvDiagrammerToolBar getToolbar()
Returns the toolbar displayed above the table.


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.

actionPerformed

public void actionPerformed(ActionEvent e)
Implementation of the ActionListener interface. This method is called when the user selects a new tag (type) in the combo box in the toolbar.

The default implementation filters the contents of the table according to the selected tag.

Specified by:
actionPerformed in interface ActionListener
Parameters:
e - The action event.

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.



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