cz.cmc.tcgui
Class TCGraphConstants

java.lang.Object
  extended byorg.jgraph.graph.GraphConstants
      extended bycz.cmc.tcgui.TCGraphConstants

public class TCGraphConstants
extends org.jgraph.graph.GraphConstants

Title: class TCGraphConstants

Description: Support for manipulationm with attribute maps

Copyright: Copyright (c) 2003

Company: CMC Computers


Nested Class Summary
static class TCGraphConstants.NullDataDefTCObject
          Null object to be used instead of null, where null is not allowed
static class TCGraphConstants.NullObject
          Null object to be used instead of null, where null is not allowed
 
Field Summary
static String[] availableKeys
           
static String DATA_DEFINITION
          Maximum size for an autosized cell.
static String FILTER_ENTRY_INDEX
          index of a filter entry.
static String FILTER_PRIORITY
          Priority of a filter.
static String MAXIMUM_SIZE
          Maximum size for an autosized cell.
static String MINIMUM_SIZE
          Minimum size for an autosized cell.
static Object NULL_DATADEF_OBJECT
          Null datadef object
static Object NULL_OBJECT
          Null object
static String TYPE_FONT
          Font to write cell types with.
 
Fields inherited from class org.jgraph.graph.GraphConstants
ABSOLUTE, ARROW_CIRCLE, ARROW_CLASSIC, ARROW_DIAMOND, ARROW_DOUBLELINE, ARROW_LINE, ARROW_NONE, ARROW_SIMPLE, ARROW_TECHNICAL, AUTOSIZE, BACKGROUND, BEGINFILL, BEGINSIZE, BENDABLE, BORDER, BORDERCOLOR, BOUNDS, CONNECTABLE, dash, DASHPATTERN, DEFAULTDECORATIONSIZE, defaultFont, DEFAULTFONTSIZE, DEFAULTFONTSTYLE, DISCONNECTABLE, dummyPoint, EDITABLE, ENDFILL, ENDSIZE, FONT, FOREGROUND, HORIZONTAL_ALIGNMENT, HORIZONTAL_TEXT_POSITION, ICON, LABELPOSITION, LINEBEGIN, LINECOLOR, LINEEND, LINESTYLE, LINEWIDTH, MOVEABLE, OFFSET, OPAQUE, PERCENT, POINTS, REMOVEALL, REMOVEATTRIBUTES, REPLACEATTRIBUTES, ROUTING, ROUTING_SIMPLE, SELECTION_STROKE, SIZE, SIZEABLE, STYLE_BEZIER, STYLE_ORTHOGONAL, STYLE_QUADRATIC, VALUE, VERTICAL_ALIGNMENT, VERTICAL_TEXT_POSITION
 
Constructor Summary
TCGraphConstants()
           
 
Method Summary
static TCObject getDataDefinition(Map map)
          Returns the data definition object.
static TCObject getDataDefinition(TCObject tco)
          Abbrevation for getting datadefinition from TCObject's attributes.
static String getFilterName(Map map)
          Returns the name of the queuing disciplne type.
static int getFilterPriority(Map map)
          Returns the priority of the filter.
static Dimension getMaximumSize(Map map)
          Returns the maximum size for an autosized cell.
static Dimension getMinimumSize(Map map)
          Returns the minimum size for an autosized cell.
static Point getOrigin(Map map)
          Returns the origin parameter (determined from the current bounds).
static String getQDiscName(Map map)
          Returns the name of the queuing disciplne type.
static int getTCObjectContainerEntryIndex(Map map)
          Returns the index of the tc object container entry.
static Font getTypeFont(Map map)
          Returns the Font to write TC objects type with.
static boolean hasMaximumSize(Map map)
          Returns whether the cell has a maximum auto-size set.
static boolean hasMinimumSize(Map map)
          Returns whether the cell has a minimum auto-size set.
static boolean hasNullValue(Map map, AttributeEntryInstance aei)
          Returns whether if the attributeentry instance has value of the nul object.
static Map mapForCell(Map attributes, Object cell)
          Returns map for the given cell from the given attributes.
static void resetDataDefinition(Map map)
          Resets the data definition object to the null datadef object.
static void setDataDefinition(Map map, TCObject tco)
          Sets the data definition object.
static void setFilterPriority(Map map, int prio)
          Sets the filter priority.
static void setMaximumSize(Map map, Dimension d)
          Sets the maximum size for an autosized cell.
static void setMinimumSize(Map map, Dimension d)
          Sets the minimum size for an autosized cell.
static void setNullValue(Map map, AttributeEntryInstance aei)
          Sets the value of null object for the given AttributeEntryInstance
static void setOrigin(Map map, int x, int y)
          Sets the origin parameter for the attached cell.
static void setOrigin(Map map, Point origin)
          Sets the origin parameter for the attached cell.
static void setTCObjectContainerEntryIndex(Map map, int index)
          Sets the index of the given tc object container entry.
static void setTypeFont(Map map, Font font)
          Sets the Font to write cell types with.
 
Methods inherited from class org.jgraph.graph.GraphConstants
applyMap, cloneMap, clonePoints, createAttributes, createAttributes, createAttributes, createAttributes, createAttributesFromModel, createMap, getBackground, getBeginSize, getBorder, getBorderColor, getBounds, getDashPattern, getEndSize, getFont, getForeground, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getLabelPosition, getLineBegin, getLineColor, getLineEnd, getLineStyle, getLineWidth, getOffset, getPoints, getRemoveAttributes, getRouting, getSize, getValue, getVerticalAlignment, getVerticalTextPosition, isAbsolute, isAutoSize, isBeginFill, isBendable, isConnectable, isDisconnectable, isEditable, isEndFill, isMoveable, isOpaque, isRemoveAll, isSizeable, replaceKeys, scale, setAbsolute, setAutoSize, setBackground, setBeginFill, setBeginSize, setBendable, setBorder, setBorderColor, setBounds, setConnectable, setDashPattern, setDisconnectable, setEditable, setEndFill, setEndSize, setFont, setForeground, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setLabelPosition, setLineBegin, setLineColor, setLineEnd, setLineStyle, setLineWidth, setMoveable, setOffset, setOpaque, setPoints, setRemoveAll, setRemoveAttributes, setRouting, setSize, setSizeable, setValue, setVerticalAlignment, setVerticalTextPosition, translate, translate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

availableKeys

public static String[] availableKeys

TYPE_FONT

public static final String TYPE_FONT
Font to write cell types with. Use instances of Font for this.

See Also:
Constant Field Values

MINIMUM_SIZE

public static final String MINIMUM_SIZE
Minimum size for an autosized cell.

See Also:
Constant Field Values

MAXIMUM_SIZE

public static final String MAXIMUM_SIZE
Maximum size for an autosized cell.

See Also:
Constant Field Values

DATA_DEFINITION

public static final String DATA_DEFINITION
Maximum size for an autosized cell.

See Also:
Constant Field Values

FILTER_PRIORITY

public static final String FILTER_PRIORITY
Priority of a filter.

See Also:
Constant Field Values

FILTER_ENTRY_INDEX

public static final String FILTER_ENTRY_INDEX
index of a filter entry.

See Also:
Constant Field Values

NULL_OBJECT

public static final Object NULL_OBJECT
Null object


NULL_DATADEF_OBJECT

public static final Object NULL_DATADEF_OBJECT
Null datadef object

Constructor Detail

TCGraphConstants

public TCGraphConstants()
Method Detail

setOrigin

public static void setOrigin(Map map,
                             Point origin)
Sets the origin parameter for the attached cell. Note that this only updates the origin of bounds' rectangle.

Parameters:
map - The map to store the font attribute in.
origin - point which is the cell located at.

setOrigin

public static void setOrigin(Map map,
                             int x,
                             int y)
Sets the origin parameter for the attached cell. Note that this only updates the origin of bounds' rectangle.

Parameters:
map - The map to store the font attribute in.
x - x-coordinate of the cell location
y - y-coordinate of the cell location

getOrigin

public static Point getOrigin(Map map)
Returns the origin parameter (determined from the current bounds).


setTypeFont

public static void setTypeFont(Map map,
                               Font font)
Sets the Font to write cell types with.

Parameters:
map - The map to store the font attribute in.
font - The value to set the attribute to.

getTypeFont

public static Font getTypeFont(Map map)
Returns the Font to write TC objects type with. Uses default font if no font is specified in the attribute map.


getQDiscName

public static String getQDiscName(Map map)
Returns the name of the queuing disciplne type.


getFilterName

public static String getFilterName(Map map)
Returns the name of the queuing disciplne type.


setMinimumSize

public static void setMinimumSize(Map map,
                                  Dimension d)
Sets the minimum size for an autosized cell.


getMinimumSize

public static Dimension getMinimumSize(Map map)
Returns the minimum size for an autosized cell.


hasMinimumSize

public static boolean hasMinimumSize(Map map)
Returns whether the cell has a minimum auto-size set.


setMaximumSize

public static void setMaximumSize(Map map,
                                  Dimension d)
Sets the maximum size for an autosized cell.


getMaximumSize

public static Dimension getMaximumSize(Map map)
Returns the maximum size for an autosized cell.


hasMaximumSize

public static boolean hasMaximumSize(Map map)
Returns whether the cell has a maximum auto-size set.


setDataDefinition

public static void setDataDefinition(Map map,
                                     TCObject tco)
Sets the data definition object.


resetDataDefinition

public static void resetDataDefinition(Map map)
Resets the data definition object to the null datadef object.


getDataDefinition

public static TCObject getDataDefinition(Map map)
Returns the data definition object.


getDataDefinition

public static TCObject getDataDefinition(TCObject tco)
Abbrevation for getting datadefinition from TCObject's attributes.

See Also:
getDataDefinition(Map map)

setNullValue

public static void setNullValue(Map map,
                                AttributeEntryInstance aei)
Sets the value of null object for the given AttributeEntryInstance

Parameters:
map - Map to put the null value to
aei - AttributeEntryInstance to set the null value for

hasNullValue

public static boolean hasNullValue(Map map,
                                   AttributeEntryInstance aei)
Returns whether if the attributeentry instance has value of the nul object. Returns false if it has any other value or if the AttributeEntryInstance is not contained in the map.


setFilterPriority

public static void setFilterPriority(Map map,
                                     int prio)
Sets the filter priority.


getFilterPriority

public static int getFilterPriority(Map map)
Returns the priority of the filter.


setTCObjectContainerEntryIndex

public static void setTCObjectContainerEntryIndex(Map map,
                                                  int index)
Sets the index of the given tc object container entry.


getTCObjectContainerEntryIndex

public static int getTCObjectContainerEntryIndex(Map map)
Returns the index of the tc object container entry.


mapForCell

public static Map mapForCell(Map attributes,
                             Object cell)
Returns map for the given cell from the given attributes. If the attributes have no map for the given cell, it will be created.