tico.board
Class TBoard

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by org.jgraph.JGraph
                  extended by tico.board.TBoard
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.Scrollable

public class TBoard
extends org.jgraph.JGraph

A control that displays a communication board. A TBoard object doesn't actually contain your data; it simply provides a view of the data. Like any non-trivial Swing component, the board gets data by querying its data model. TBoard displays its data by drawing individual elements. Each element displayed by the board contains exactly one item of data, which is called a component.

Version:
1.0 Nov 20, 2006
Author:
Pablo Muñoz
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jgraph.JGraph
org.jgraph.JGraph.EmptySelectionModel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.BaselineResizeBehavior
 
Field Summary
static java.awt.Color DEFAULT_BORDER_COLOR
          Board border color which is used to mark the orginialSize border
 
Fields inherited from class org.jgraph.JGraph
ANTIALIASED_PROPERTY, CROSS_GRID_MODE, DOT_GRID_MODE, EDITABLE_PROPERTY, GRAPH_LAYOUT_CACHE_PROPERTY, GRAPH_MODEL_PROPERTY, GRID_COLOR_PROPERTY, GRID_SIZE_PROPERTY, GRID_VISIBLE_PROPERTY, HANDLE_COLOR_PROPERTY, HANDLE_SIZE_PROPERTY, INVOKES_STOP_CELL_EDITING_PROPERTY, LINE_GRID_MODE, LOCKED_HANDLE_COLOR_PROPERTY, MARQUEE_HANDLER_PROPERTY, PORTS_SCALED_PROPERTY, PORTS_VISIBLE_PROPERTY, SCALE_PROPERTY, SELECTION_MODEL_PROPERTY, SELECTIONENABLED_PROPERTY, VERSION
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, 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
TBoard()
          Creates a new empty TBoard.
TBoard(org.jgraph.graph.AttributeMap attributes)
          Creates a new empty TBoard with the specified initial attributes.
TBoard(org.jgraph.graph.AttributeMap attributes, java.lang.String name)
          Creates a new empty TBoard with the specified initial attributes and name.
TBoard(java.lang.String name)
          Creates a new empty TBoard with the specified initial name.
TBoard(TBoardModel model)
          Creates a new TBoard with the specified initial model.
TBoard(TBoardModel model, java.lang.String name)
          Creates a new TBoard with the specified initial model and name.
 
Method Summary
 void addBoardChangeListener(BoardChangeListener listener)
          Adds an BoardChangeListener.
 java.lang.String getBoardName()
          Returns the board name.
 java.awt.image.BufferedImage getImage()
          Returns a BufferedImage that represents the board.
static java.lang.String newBoardName()
          Creates a new board name different from any other board name created with this function.
 void removeBoardChangeListener(BoardChangeListener listener)
          Removes a BoardChangeListener.
 void setBoardName(java.lang.String name)
          Sets the board name.
 java.lang.String toString()
           
 void updateUI()
           
static TBoard XMLDecode(org.w3c.dom.Element element)
          Returns a TBoard object from the data contained in the XML Element.
 org.w3c.dom.Element XMLEncode(org.w3c.dom.Document doc)
          Generates an XML Element that contains the board information.
 
Methods inherited from class org.jgraph.JGraph
addGraphSelectionListener, addSampleData, addSelectionCell, addSelectionCells, cancelEditing, clearSelection, cloneCells, convertValueToString, createBounds, fromScreen, fromScreen, getAttributes, getCellBounds, getCellBounds, getDefaultPortForCell, getDescendants, getEditClickCount, getEditingCell, getFirstCellForLocation, getGraphLayoutCache, getGridColor, getGridMode, getGridSize, getHandleColor, getHandleSize, getHighlightColor, getImage, getInvokesStopCellEditing, getLeafViewAt, getLockedHandleColor, getMarqueeColor, getMarqueeHandler, getMinimumMove, getModel, getNextCellForLocation, getNextSelectableViewAt, getNextViewAt, getNextViewAt, getNextViewAt, getNextViewAt, getPortForLocation, getPortViewAt, getPreferredScrollableViewportSize, getRoots, getRoots, getScale, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectionCell, getSelectionCellAt, getSelectionCells, getSelectionCells, getSelectionCount, getSelectionModel, getTolerance, getToolTipText, getTopmostViewAt, getUI, getUIClassID, graphDidChange, isAntiAliased, isBendable, isCellEditable, isCellSelected, isCloneable, isConnectable, isDisconnectable, isDisconnectOnMove, isDragEnabled, isDropEnabled, isEditable, isEditing, isGridEnabled, isGridVisible, isJumpToDefaultPort, isMoveable, isMoveBelowZero, isMoveIntoGroups, isMoveOutOfGroups, isPortsScaled, isPortsVisible, isPreviewInvalidNullPorts, isSelectionEmpty, isSelectionEnabled, isSizeable, main, order, removeGraphSelectionListener, removeSelectionCell, scrollCellToVisible, scrollPointToVisible, setAntiAliased, setBendable, setCloneable, setConnectable, setDisconnectable, setDisconnectOnMove, setDragEnabled, setDropEnabled, setEditable, setEditClickCount, setGraphLayoutCache, setGridColor, setGridEnabled, setGridMode, setGridSize, setGridVisible, setHandleColor, setHandleSize, setHighlightColor, setInvokesStopCellEditing, setJumpToDefaultPort, setLockedHandleColor, setMarqueeColor, setMarqueeHandler, setMinimumMove, setModel, setMoveable, setMoveBelowZero, setMoveIntoGroups, setMoveOutOfGroups, setPortsScaled, setPortsVisible, setPreviewInvalidNullPorts, setScale, setSelectionCell, setSelectionCells, setSelectionEnabled, setSelectionModel, setSizeable, setTolerance, setUI, snap, snap, snap, startEditingAtCell, stopEditing, toScreen, toScreen, updateAutoSize
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, 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, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, 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, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.accessibility.Accessible
getAccessibleContext
 

Field Detail

DEFAULT_BORDER_COLOR

public static final java.awt.Color DEFAULT_BORDER_COLOR
Board border color which is used to mark the orginialSize border

Constructor Detail

TBoard

public TBoard()
Creates a new empty TBoard.


TBoard

public TBoard(java.lang.String name)
Creates a new empty TBoard with the specified initial name.

Parameters:
name - The specified initial name

TBoard

public TBoard(org.jgraph.graph.AttributeMap attributes)
Creates a new empty TBoard with the specified initial attributes.

Parameters:
attributes - The specified initial attributes

TBoard

public TBoard(org.jgraph.graph.AttributeMap attributes,
              java.lang.String name)
Creates a new empty TBoard with the specified initial attributes and name.

Parameters:
attributes - The specified initial attributes
name - The specified initial name

TBoard

public TBoard(TBoardModel model,
              java.lang.String name)
Creates a new TBoard with the specified initial model and name.

Parameters:
model - The specified initial model
name - The specified initial name

TBoard

public TBoard(TBoardModel model)
Creates a new TBoard with the specified initial model.

Parameters:
model - The specified initial model
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.awt.Component

getBoardName

public java.lang.String getBoardName()
Returns the board name.

Returns:
The board name

setBoardName

public void setBoardName(java.lang.String name)
Sets the board name.

Parameters:
name - The board name to set

newBoardName

public static java.lang.String newBoardName()
Creates a new board name different from any other board name created with this function.

Returns:
The new board name

updateUI

public void updateUI()
Overrides:
updateUI in class org.jgraph.JGraph

addBoardChangeListener

public void addBoardChangeListener(BoardChangeListener listener)
Adds an BoardChangeListener. The BoardChangeListener. will receive a BoardChangeEvent when any board change has been made.

Parameters:
listener - The BoardChangeListener that is to be notified

removeBoardChangeListener

public void removeBoardChangeListener(BoardChangeListener listener)
Removes a BoardChangeListener.

Parameters:
listener - The BoardChangeListener to remove

getImage

public java.awt.image.BufferedImage getImage()
Returns a BufferedImage that represents the board.

Returns:
The BufferedImage that represents the board

XMLEncode

public org.w3c.dom.Element XMLEncode(org.w3c.dom.Document doc)
Generates an XML Element that contains the board information.

Parameters:
doc - The Document that represents the entire XML document
Returns:
The XML Element generated

XMLDecode

public static TBoard XMLDecode(org.w3c.dom.Element element)
                        throws InvalidFormatException
Returns a TBoard object from the data contained in the XML Element.

Parameters:
element - The XML Element that contains the board data
Returns:
The generated TBoard
Throws:
InvalidFormatException - If Element has an invalid format