|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlt.monarch.chart.AbstractView<E>
lt.monarch.chart.view.CompositeView<E>
lt.monarch.chart.view.DecoratedView<E>
public class DecoratedView<E extends AbstractPaintTags> extends CompositeView<E> implements ExpandableDecoration
Decorates a chart with four optional views, arranged as
in the java.awt.BorderLayout, but it also allows to specify
the level of overlap. By default sub-views do not overlap and layout in
a similar way to the java.awt.BorderLayout. If overlap is
specified, side components overlap with the center component.
| Modifier and Type | Field and Description |
|---|---|
protected Alignment |
bottomAlignment
|
protected int |
bottomOverlap
|
protected View |
bottomView
|
protected Alignment |
leftAlignment
|
protected int |
leftOverlap
|
protected View |
leftView
|
protected Alignment |
rightAlignment
|
protected int |
rightOverlap
|
protected View |
rightView
|
protected Alignment |
topAlignment
|
protected int |
topOverlap
|
protected View |
topView
|
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 and Description |
|---|
DecoratedView(View view)
Creates a decorated view. |
| Modifier and Type | Method and Description |
|---|---|
Alignment |
getBottomAlignment()
|
View |
getBottomView()
|
Alignment |
getLeftAlignment()
|
View |
getLeftView()
|
java.awt.Dimension |
getPreferredSize(AbstractGraphics g)
Gets the preferred size of this view in the specified Graphics context. |
Alignment |
getRightAlignment()
|
View |
getRightView()
|
Alignment |
getTopAlignment()
|
View |
getTopView()
|
protected java.awt.Dimension |
getViewSize(AbstractGraphics g,
View view)
|
boolean |
isHorizontallyExpandable()
Should return true if width of this view, when persisting in
top or bottom position inside DecoratedView,
should be expanded to maximum space available. |
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. |
protected Rectangle2D |
narrow(Rectangle2D bounds,
java.awt.Dimension maxSize)
|
void |
removeView(View v)
Removes the view from this container. |
void |
setBottomView(View view)
Adds a bottom view with no overlap. |
void |
setBottomView(View view,
int overlap)
Adds a bottom view. |
void |
setBottomView(View view,
int overlap,
Alignment alignment)
Adds a bottom view. |
void |
setLeftView(View view)
Adds a left view with no overlap. |
void |
setLeftView(View view,
int overlap)
Adds a left view. |
void |
setLeftView(View view,
int overlap,
Alignment alignment)
Adds a left view. |
void |
setRightView(View view)
Adds a right view with no overlap. |
void |
setRightView(View view,
int overlap)
Adds a right view. |
void |
setRightView(View view,
int overlap,
Alignment alignment)
Adds a right view. |
void |
setTopView(View view)
Adds a top view with no overlap. |
void |
setTopView(View view,
int overlap)
Adds a top view. |
void |
setTopView(View view,
int overlap,
Alignment alignment)
Adds a top view. |
| Methods inherited from class lt.monarch.chart.view.CompositeView |
|---|
addView, dispose, getContainingObjects, getGraphicsType, getViewCount, getViews, paint, 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, 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 |
|---|
protected View view
protected int topOverlap
protected View topView
protected Alignment topAlignment
protected int bottomOverlap
protected View bottomView
protected Alignment bottomAlignment
protected int leftOverlap
protected View leftView
protected Alignment leftAlignment
protected int rightOverlap
protected View rightView
protected Alignment rightAlignment
| Constructor Detail |
|---|
public DecoratedView(View view)
view - a sub-view, to be used as a center view.| Method Detail |
|---|
public void setTopView(View view)
view - view to be addedpublic void setBottomView(View view)
view - view to be addedpublic void setLeftView(View view)
view - view to be addedpublic void setRightView(View view)
view - view to be added
public void setTopView(View view,
int overlap)
view - view to be addedoverlap - overlap coefficient. 0 results in no overlap, while 100 results in a complete overlap.
public void setBottomView(View view,
int overlap)
view - view to be addedoverlap - overlap coefficient. 0 results in no overlap, while 100 results in a complete overlap.
public void setLeftView(View view,
int overlap)
view - view to be addedoverlap - overlap coefficient. 0 results in no overlap, while 100 results in a complete overlap.
public void setRightView(View view,
int overlap)
view - view to be addedoverlap - overlap coefficient. 0 results in no overlap, while 100 results in a complete overlap.
public void setTopView(View view,
int overlap,
Alignment alignment)
view - view to be addedoverlap - overlap coefficient. 0 results in no overlap, while 100 results in a complete overlap.alignment - horizontal alignment it can be: CENTER, LEFT, RIGHT.
public void setBottomView(View view,
int overlap,
Alignment alignment)
view - view to be addedoverlap - overlap coefficient. 0 results in no overlap, while 100 results in a complete overlap.alignment - horizontal alignment it can be: CENTER, LEFT, RIGHT.
public void setLeftView(View view,
int overlap,
Alignment alignment)
view - view to be addedoverlap - overlap coefficient. 0 results in no overlap, while 100 results in a complete overlap.alignment - vertical alignment it can be: CENTER, TOP, BOTTOM.
public void setRightView(View view,
int overlap,
Alignment alignment)
view - view to be addedoverlap - overlap coefficient. 0 results in no overlap, while 100 results in a complete overlap.alignment - vertical alignment it can be: CENTER, TOP, BOTTOM.public void removeView(View v)
removeView in class CompositeView<E extends AbstractPaintTags>v - view to be addedpublic java.awt.Dimension getPreferredSize(AbstractGraphics g)
AbstractView
getPreferredSize in interface ViewgetPreferredSize in class AbstractView<E extends AbstractPaintTags>g - the Graphics context in which view will be painted
protected Rectangle2D narrow(Rectangle2D bounds,
java.awt.Dimension maxSize)
protected java.awt.Dimension getViewSize(AbstractGraphics g,
View view)
protected void layout(AbstractGraphics g)
AbstractView
layout in class AbstractView<E extends AbstractPaintTags>g - graphics contextpublic View getTopView()
public View getBottomView()
public View getLeftView()
public View getRightView()
public Alignment getTopAlignment()
public Alignment getBottomAlignment()
public Alignment getLeftAlignment()
public Alignment getRightAlignment()
public boolean isHorizontallyExpandable()
ExpandableDecorationtrue if width of this view, when persisting in
top or bottom position inside DecoratedView,
should be expanded to maximum space available.
isHorizontallyExpandable in interface ExpandableDecorationtrue if view's width should be expanded to maximum,
false other wise.public boolean isVerticallyExpandable()
ExpandableDecorationtrue if height of this view, when persisting in
left or right position inside DecoratedView,
should be expanded to maximum space available.
isVerticallyExpandable in interface ExpandableDecorationtrue if view's height should be expanded to maximum,
false other wise.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||