|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface View extends java.lang.Cloneable
View is responsible for managing output to some output region
| Modifier and Type | Method and Description |
|---|---|
void |
addViewListener(ViewListener listener)
Registers a view listener |
java.lang.Object |
clone()
Must be provided in implementing classes |
ViewContainer |
container()
Returns the container for the view |
void |
dispose()
Releases all allocated resources. |
float |
getAlignmentX()
Returns the alignment along the x axis. |
float |
getAlignmentY()
Returns the alignment along the y axis. |
Rectangle2D |
getBounds()
Queries view bounds |
java.util.List<?> |
getContainingObjects()
Returns all containing objects |
GraphicsManager.GraphicsType |
getGraphicsType()
Returns graphics type |
double |
getHeight()
Return the current height of this view. |
java.awt.Dimension |
getMaximumSize(AbstractGraphics g)
Gets the maximum size of this view. |
java.awt.Dimension |
getMinimumSize(AbstractGraphics g)
Gets the minimum size of this view. |
java.awt.Dimension |
getPreferredSize(AbstractGraphics g)
Returns preferred view size for rendering on the specified graphics context |
java.awt.Dimension |
getSize()
Returns the size of this view in the form of a Dimension object. |
java.awt.Dimension |
getSize(java.awt.Dimension rv)
Store the width/height of this view into "return value" rv and return rv. |
Style |
getStyle()
Returns the associated local stylesheet |
double |
getWidth()
Return the current width of this view. |
double |
getX()
Return the current x coordinate of the views origin. |
double |
getY()
Return the current y coordinate of the views origin. |
void |
invalidate()
Requests a view revalidation |
void |
removeViewListener(ViewListener listener)
Unregisters a view listener |
void |
render(AbstractGraphics g)
Renders the view |
void |
repaint()
Requests a view repaint |
void |
repaint(Rectangle2D r)
Requests a repaint of a view region |
void |
setAlignmentX(float alignmentX)
Sets the the vertical alignment. |
void |
setAlignmentY(float alignmentY)
Sets the the horizontal alignment. |
void |
setBounds(double x,
double y,
double width,
double height)
Moves and resizes this view. |
void |
setBounds(Rectangle2D bounds)
Sets bounds, where the view should render itself |
void |
setContainer(ViewContainer container)
Sets the container for the view. |
void |
setLocation(double x,
double y)
Moves this view to a new location. |
void |
setMaximumSize(int width,
int height)
Sets the maximum size of this view to a constant value. |
void |
setMinimumSize(int width,
int height)
Sets the minimum size of this view to a constant value. |
void |
setPreferredSize(int width,
int height)
Sets the preferred size of the receiving view. |
void |
setSize(double width,
double height)
Resizes this view so that it has width width
and height. |
void |
validate(AbstractGraphics g)
Prepares the view for rendering |
| Method Detail |
|---|
void addViewListener(ViewListener listener)
listener - view listenervoid removeViewListener(ViewListener listener)
listener - view listenervoid setContainer(ViewContainer container)
container - chart containervoid setBounds(Rectangle2D bounds)
bounds - chart boundsRectangle2D getBounds()
ViewContainer container()
void validate(AbstractGraphics g)
g - graphics contextvoid render(AbstractGraphics g)
g - graphics contextjava.awt.Dimension getPreferredSize(AbstractGraphics g)
g - graphics contextvoid repaint()
void repaint(Rectangle2D r)
r - view regionvoid invalidate()
Style getStyle()
void setBounds(double x,
double y,
double width,
double height)
x and y, and the
new size is specified by width and height.
x - The new x-coordinate of this view.y - The new y-coordinate of this view.width - The new width of this view.height - The new height of this view.
void setLocation(double x,
double y)
x and y.
x - The x-coordinate of the new location'stop-left corner.y - The y-coordinate of the new location's top-left corner.double getX()
double getY()
java.awt.Dimension getMaximumSize(AbstractGraphics g)
g - the Graphics context in which the view will be paintedjava.awt.Dimension getMinimumSize(AbstractGraphics g)
g - the Graphics context in which the view will be painted
void setSize(double width,
double height)
width
and height.
width - The new width of this view in pixels.height - The new height of this view in pixels.java.awt.Dimension getSize()
Dimension object. The height
field of the Dimension object contains
this view's height, and the width
field of the Dimension object contains
this view's width.
Dimension object that indicates the
size of this view.java.awt.Dimension getSize(java.awt.Dimension rv)
rv - the return value, modified to the view sizedouble getHeight()
double getWidth()
void setMinimumSize(int width,
int height)
width - the minimum width of the viewheight - the minimum height of the view
void setMaximumSize(int width,
int height)
width - the maximum width of the viewheight - the maximum height of the view
void setPreferredSize(int width,
int height)
width - the preferred width of the receiving viewheight - the preferred height of the receiving viewfloat getAlignmentX()
float getAlignmentY()
void setAlignmentX(float alignmentX)
alignmentX - the alignment along the x axisvoid setAlignmentY(float alignmentY)
alignmentY - the alignment along the y axisvoid dispose()
java.lang.Object clone()
GraphicsManager.GraphicsType getGraphicsType()
java.util.List<?> getContainingObjects()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||