lt.monarch.chart.view
Class AbstractBorderDecorator<E extends AbstractPaintTags>

java.lang.Object
  extended by lt.monarch.chart.AbstractView<E>
      extended by lt.monarch.chart.view.CompositeView<E>
          extended by lt.monarch.chart.view.AbstractBorderDecorator<E>
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, StyleEditorEntity, View, ViewListener, ExpandableDecoration
Direct Known Subclasses:
LineBorderDecorator

public abstract class AbstractBorderDecorator<E extends AbstractPaintTags>
extends CompositeView<E>
implements ExpandableDecoration

Abstract class for border decorators.

See Also:
Serialized Form

Field Summary
Modifier and Type Field and Description
protected  int bottom
           
protected  int left
           
protected  int right
           
protected  int top
           
protected  View view
           
 
Fields inherited from class lt.monarch.chart.view.CompositeView
views
 
Fields inherited from class lt.monarch.chart.AbstractView
layoutInvalid, paintStyle, style
 
Constructor Summary
Constructor and Description
AbstractBorderDecorator(View view)
           
 
Method Summary
Modifier and Type Method and Description
 java.awt.Dimension getPreferredSize(AbstractGraphics g)
          Gets the preferred size of this view in the specified Graphics context.
 boolean isHorizontallyExpandable()
          Default ExpandableDecoration implementation
 boolean isVerticallyExpandable()
          Should return true if height of this view, when persisting in left or right position inside DecoratedView, should be expanded to maximum space available.
protected  void layout(AbstractGraphics g)
          Prepares the view by arranging all internal views and calculates required constants.
 void setBounds(Rectangle2D r)
          Moves and resizes this view to conform to the new bounding rectangle r.
 
Methods inherited from class lt.monarch.chart.view.CompositeView
addView, dispose, getContainingObjects, getGraphicsType, getViewCount, getViews, paint, removeView, setContainer, setView, validate, viewActivated, viewDeactivated, viewInvalidated
 
Methods inherited from class lt.monarch.chart.AbstractView
activate, addViewListener, clone, container, deactivate, finalize, getAlignmentX, getAlignmentY, getBounds, getChartObjectBounds, getContainer, getHeight, getMaximumSize, getMinimumSize, getPaintMode, getPaintStyle, getParent, getSize, getSize, getStyle, getStyle, getWidth, getX, getY, invalidate, isLayoutValid, removeViewListener, render, repaint, repaint, setAlignmentX, setAlignmentY, setBounds, setLocation, setMaximumSize, setMinimumSize, setPaintMode, setPreferredSize, setSize
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

view

protected View view

top

protected int top

right

protected int right

bottom

protected int bottom

left

protected int left
Constructor Detail

AbstractBorderDecorator

public AbstractBorderDecorator(View view)
Method Detail

getPreferredSize

public java.awt.Dimension getPreferredSize(AbstractGraphics g)
Description copied from class: AbstractView
Gets the preferred size of this view in the specified Graphics context.

Specified by:
getPreferredSize in interface View
Overrides:
getPreferredSize in class AbstractView<E extends AbstractPaintTags>
Parameters:
g - the Graphics context in which view will be painted
Returns:
a dimension object indicating this view's preferred size.

layout

protected void layout(AbstractGraphics g)
Description copied from class: AbstractView
Prepares the view by arranging all internal views and calculates required constants.

Overrides:
layout in class AbstractView<E extends AbstractPaintTags>
Parameters:
g - graphics context

setBounds

public void setBounds(Rectangle2D r)
Description copied from class: AbstractView
Moves and resizes this view to conform to the new bounding rectangle r. This view's new position is specified by r.x and r.y, and its new size is specified by r.width and r.height

Specified by:
setBounds in interface View
Overrides:
setBounds in class AbstractView<E extends AbstractPaintTags>
Parameters:
r - the new bounding rectangle for this view

isHorizontallyExpandable

public boolean isHorizontallyExpandable()
Default ExpandableDecoration implementation

Specified by:
isHorizontallyExpandable in interface ExpandableDecoration
Returns:
true if view's width should be expanded to maximum, false other wise.

isVerticallyExpandable

public boolean isVerticallyExpandable()
Description copied from interface: ExpandableDecoration
Should return true if height of this view, when persisting in left or right position inside DecoratedView, should be expanded to maximum space available.

Specified by:
isVerticallyExpandable in interface ExpandableDecoration
Returns:
true if view's height should be expanded to maximum, false other wise.