de.matthiasmann.twl
Class Graph

java.lang.Object
  extended by de.matthiasmann.twl.Widget
      extended by de.matthiasmann.twl.Graph

public class Graph
extends Widget


Nested Class Summary
 
Nested classes/interfaces inherited from class de.matthiasmann.twl.Widget
Widget.OffscreenMouseAdjustments, Widget.RenderOffscreen
 
Field Summary
 
Fields inherited from class de.matthiasmann.twl.Widget
STATE_DISABLED, STATE_HAS_FOCUSED_CHILD, STATE_HAS_OPEN_POPUPS, STATE_KEYBOARD_FOCUS
 
Constructor Summary
Graph()
           
Graph(GraphModel model)
           
 
Method Summary
protected  void applyTheme(ThemeInfo themeInfo)
          Apply the given theme.
protected  void applyThemeGraph(ThemeInfo themeInfo)
           
 GraphModel getModel()
           
 int getSizeMultipleX()
           
 int getSizeMultipleY()
           
protected  void invalidateLineStyles()
           
protected  void layout()
          Called when the layoutInvalid flag is set.
 void setModel(GraphModel model)
           
 boolean setSize(int width, int height)
          Changes the size of this widget.
 void setSizeMultipleX(int sizeMultipleX)
           
 void setSizeMultipleY(int sizeMultipleY)
           
 
Methods inherited from class de.matthiasmann.twl.Widget
add, addActionMapping, addPropertyChangeListener, addPropertyChangeListener, adjustSize, afterAddToGUI, allChildrenRemoved, applyThemeBackground, applyThemeBorder, applyThemeInputMap, applyThemeMaxSize, applyThemeMinSize, applyThemeMouseCursor, applyThemeOffscreenExtra, applyThemeOverlay, applyThemeTooltip, beforeRemoveFromGUI, borderChanged, canAcceptKeyboardFocus, childAdded, childInvalidateLayout, childRemoved, childVisibilityChanged, computeSize, destroy, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, focusFirstChild, focusLastChild, focusNextChild, focusPrevChild, getActionMap, getAnimationState, getBackground, getBorderBottom, getBorderHorizontal, getBorderLeft, getBorderRight, getBorderTop, getBorderVertical, getBottom, getChild, getChildAt, getChildIndex, getGUI, getHeight, getInnerBottom, getInnerHeight, getInnerRight, getInnerWidth, getInnerX, getInnerY, getInputMap, getKeyboardFocusOrder, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getMouseCursor, getMouseCursor, getNumChildren, getOffscreenExtraBottom, getOffscreenExtraLeft, getOffscreenExtraRight, getOffscreenExtraTop, getOrCreateActionMap, getOverlay, getParent, getPreferredHeight, getPreferredInnerHeight, getPreferredInnerWidth, getPreferredWidth, getRenderOffscreen, getRight, getRootWidget, getTheme, getThemePath, getThemeTooltipContent, getTintAnimator, getTooltipContent, getTooltipContentAt, getWidgetAt, getWidth, getX, getY, giveupKeyboardFocus, handleEvent, handleKeyStrokeAction, hasKeyboardFocus, hasOpenPopups, hasSharedAnimationState, insertChild, invalidateLayout, invalidateLayoutLocally, isAbsoluteTheme, isClip, isDepthFocusTraversal, isEnabled, isFocusKeyEnabled, isInside, isLocallyEnabled, isMouseInside, isVisible, keyboardFocusChildChanged, keyboardFocusGained, keyboardFocusGained, keyboardFocusLost, layoutChildFullInnerArea, layoutChildrenFullInnerArea, moveChild, paint, paintBackground, paintChild, paintChildren, paintDragOverlay, paintOverlay, paintWidget, positionChanged, reapplyTheme, removeAllChildren, removeChild, removeChild, removePropertyChangeListener, removePropertyChangeListener, requestKeyboardFocus, requestKeyboardFocus, resetTooltip, setActionMap, setBackground, setBorderSize, setBorderSize, setBorderSize, setBorderSize, setCanAcceptKeyboardFocus, setClip, setDepthFocusTraversal, setEnabled, setFocusKeyEnabled, setInnerSize, setInputMap, setMaxSize, setMinSize, setMouseCursor, setOffscreenExtra, setOffscreenExtra, setOverlay, setPosition, setRenderOffscreen, setTheme, setTintAnimator, setTooltipContent, setVisible, sizeChanged, updateTintAnimation, updateTooltip, validateLayout, widgetDisabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Graph

public Graph()

Graph

public Graph(GraphModel model)
Method Detail

getModel

public GraphModel getModel()

setModel

public void setModel(GraphModel model)

getSizeMultipleX

public int getSizeMultipleX()

setSizeMultipleX

public void setSizeMultipleX(int sizeMultipleX)

getSizeMultipleY

public int getSizeMultipleY()

setSizeMultipleY

public void setSizeMultipleY(int sizeMultipleY)

applyTheme

protected void applyTheme(ThemeInfo themeInfo)
Description copied from class: Widget
Apply the given theme. This method also calls invalidateLayout()

Overrides:
applyTheme in class Widget
Parameters:
themeInfo - The theme info for this widget

applyThemeGraph

protected void applyThemeGraph(ThemeInfo themeInfo)

invalidateLineStyles

protected void invalidateLineStyles()

setSize

public boolean setSize(int width,
                       int height)
Description copied from class: Widget
Changes the size of this widget. Zero size is allowed but not negative. Size is not checked against parent widgets. When the size has changed then - the parent widget's childChangedSize is called - sizeChanged is called - PropertyChangeEvent are fired for "width" and "height" This method should only be called from within the layout() method of the parent. Otherwise it could lead to bad interaction with theming and result in a wrong size after the theme has been applied.

Overrides:
setSize in class Widget
Parameters:
width - The new width (including border)
height - The new height (including border)
Returns:
true if the size was changed, false if new size == old size
See Also:
Widget.sizeChanged(), Widget.layout()

layout

protected void layout()
Description copied from class: Widget
Called when the layoutInvalid flag is set. The default implementation does nothing.

Overrides:
layout in class Widget