|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectru.biosoft.graphics.View
Base class for vizualization.
| Field Summary | |
static int |
ACTIVE
Bit field of type.It is set, if the view can be selected. |
protected java.awt.geom.AffineTransform |
at
Affine transformer of view |
static int |
BASELINE
Alignment mode. |
static int |
BOTTOM
Alignment mode. |
static int |
CENTER
Alignment mode. |
static int |
HIDE
Bit field of type.It is set, if the view has visible state. |
static int |
LEFT
Alignment mode. |
protected java.lang.Object |
model
The model of the view. |
static int |
RIGHT
Alignment mode. |
protected java.awt.Shape |
shape
Shape of view |
static int |
TOP
Alignment mode. |
protected int |
type
Type of view. |
| Constructor Summary | |
View(java.awt.Shape shape)
Constructs View using specified Shape |
|
| Method Summary | |
java.awt.Rectangle |
getBounds()
Returns an integer Rectangle that completely encloses the
View. |
java.lang.Object |
getModel()
Returns model of view |
java.awt.Shape |
getShape()
Returns shape of View. |
boolean |
intersects(java.awt.Rectangle rect)
Tests if this View's shape intersects the interior of a specified rectangle. |
boolean |
isActive()
Returns true if view is active |
boolean |
isVisible()
Returns true if view is visible |
abstract void |
move(int x,
int y)
Moves View to the new location using specified offsets. |
void |
move(java.awt.Point offset)
Moves View to the new location using specified offset. |
void |
paint(java.awt.Graphics2D g2)
Paints this view on specified Graphics2D. |
void |
scale(double sx,
double sy)
Scales view in relation to old values. |
void |
setActive(boolean isActive)
Sets active state of view |
void |
setLocation(int x,
int y)
Set the location of the upper left corner of the view x, y coordinates. |
void |
setLocation(java.awt.Point pt)
Set the location of the upper left corner of the view x, y coordinates. |
void |
setModel(java.lang.Object model)
Sets model of view |
void |
setToScale(double factorX,
double factorY)
Scales view absolutely. |
void |
setVisible(boolean isVisible)
Sets visible state of view |
void |
updateBounds()
Synchronizes the Rectangle rectangle returned by getBounds()
with view. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.awt.Shape shape
protected int type
protected java.lang.Object model
protected java.awt.geom.AffineTransform at
public static final int ACTIVE
type.It is set, if the view can be selected.
public static final int HIDE
type.It is set, if the view has visible state.
public static final int LEFT
public static final int RIGHT
public static final int CENTER
public static final int BOTTOM
public static final int TOP
public static final int BASELINE
| Constructor Detail |
public View(java.awt.Shape shape)
shape - Shape of viewShape| Method Detail |
public java.lang.Object getModel()
modelpublic void setModel(java.lang.Object model)
model - New modelmodelpublic java.awt.Rectangle getBounds()
Rectangle that completely encloses the
View.
Rectangle that completely encloses the
View.public java.awt.Shape getShape()
View.
View.public void updateBounds()
Rectangle rectangle returned by getBounds()
with view. Base implementation of method does nothing.
public boolean intersects(java.awt.Rectangle rect)
rect - specified rectangle
true if intersects,false otherwise
public void setLocation(int x,
int y)
x - new coordinate along X axisy - new coordinate along Y axispublic void setLocation(java.awt.Point pt)
pt - Point of new location
public abstract void move(int x,
int y)
x - offset along the X axis direction.y - offset along the Y axis direction.public void move(java.awt.Point offset)
offset - Point that units both coordinates.
public void setToScale(double factorX,
double factorY)
factorX - sets factor along the X axis directionfactorY - sets factor along the Y axis direction
public void scale(double sx,
double sy)
sx - the factor by which coordinates are scaled along the X axis directionsy - the factor by which coordinates are scaled along the Y axis directionpublic boolean isActive()
true if view is active
true if view is activepublic void setActive(boolean isActive)
isActive - new active valuepublic boolean isVisible()
true if view is visible
true if view is visiblepublic void setVisible(boolean isVisible)
isVisible - new value of visible flagpublic void paint(java.awt.Graphics2D g2)
g2 - specified Graphics2D.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||