|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--mascoptLib.gui.views.GObject | +--mascoptLib.gui.views.View
A View.
Field Summary | |
Dimension |
preferredSize
The default dimensions of a view. |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
View(int x,
int y,
double zoomFactor)
Default constructor of a view. |
Method Summary | |
void |
addLayer(mascoptLib.gui.views.Layer layer)
Add a layer in the view. |
boolean |
contains(mascoptLib.gui.views.Layer l)
Say if this view contains this layer. |
Component |
getFirstComponentAt(Point p)
Returns the components at a point p. |
int |
getLayerCount()
Count the layers. |
int |
getLayerIndex(mascoptLib.gui.views.Layer l)
Say at which level is a layer. |
mascoptLib.gui.views.LayerInfo |
getLayerInfo(mascoptLib.gui.views.Layer l)
Get inforamtions about a layer. |
Dimension |
getPreferredSize()
Get the default prefered size. |
Dimension |
getReal(Dimension dim)
Internal calculus (?). |
Point |
getReal(Point p)
Internal calculus (?). |
Rectangle |
getReal(Rectangle r)
Internal calculus (?). |
Point |
getRealCenter()
Return the center of the view. |
Dimension |
getView(Dimension dim)
Internal calculus (?). |
Point |
getView(Point p)
Internal calculus (?). |
Rectangle |
getView(Rectangle r)
Internal calculus (?). |
double |
getZoom()
Give the zoom factor. |
void |
insertLayer(int index,
mascoptLib.gui.views.Layer layer)
Insert a layer at this level. |
void |
insertLayerInfo(int index,
mascoptLib.gui.views.LayerInfo li)
Insert caracteristics of layers at this level. |
void |
paint(Graphics g)
Paint the graphics. |
void |
removeLayer(mascoptLib.gui.views.Layer layer)
Remove a layer in the view. |
void |
repaint()
Repaint the view. |
void |
setDisplayMessage(String s)
Display a message in the view. |
void |
setLocation(int x,
int y)
Set the location of the view. |
void |
setLocation(Point p)
Set the location of the view. |
void |
setPreferredSize(Dimension dim)
Set the default prefered size. |
void |
setPreferredSize(int x,
int y)
Set the default prefered size. |
void |
setRealCenter(Point p)
Chagne the center of the view. |
void |
setVisibleLayer(mascoptLib.gui.views.Layer layer,
boolean visible)
Change the visibility of a layer in this view |
void |
setZoom(double newZoom)
Set the zoom. |
void |
translate(int realX,
int realY)
Translate the view |
void |
translate(Point realPoint)
Translate the view |
void |
updateZoom(double newZoom)
Zoom with a factor. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public Dimension preferredSize
Constructor Detail |
public View(int x, int y, double zoomFactor)
x
- the widthy
- the heightzoomFactor
- the zoom factorMethod Detail |
public void setLocation(int x, int y)
setLocation
in class Component
x
- xy
- ypublic void setLocation(Point p)
setLocation
in class Component
p
- the point to reach.public void addLayer(mascoptLib.gui.views.Layer layer)
addLayer
in class GObject
layer
- the layer to add.public void removeLayer(mascoptLib.gui.views.Layer layer)
removeLayer
in class GObject
layer
- the layer to removepublic void insertLayer(int index, mascoptLib.gui.views.Layer layer)
index
- represents the level.layer
- public void insertLayerInfo(int index, mascoptLib.gui.views.LayerInfo li)
index
- the level.li
- the informations.public int getLayerCount()
public int getLayerIndex(mascoptLib.gui.views.Layer l)
l
- the layer.
public boolean contains(mascoptLib.gui.views.Layer l)
l
- the layer.
public mascoptLib.gui.views.LayerInfo getLayerInfo(mascoptLib.gui.views.Layer l)
l
- the layer
public void setVisibleLayer(mascoptLib.gui.views.Layer layer, boolean visible)
layer
- the layervisible
- visible or notpublic Point getRealCenter()
public void setRealCenter(Point p)
p
- the point.public void translate(int realX, int realY)
translate
in class GObject
realX
- the x translationrealY
- the y translationpublic void translate(Point realPoint)
realPoint
- the point width/heightpublic double getZoom()
public void setZoom(double newZoom)
newZoom
- the zoom factor, a double.public void updateZoom(double newZoom)
newZoom
- the zoom to multiply with.public Point getReal(Point p)
public Dimension getReal(Dimension dim)
public Rectangle getReal(Rectangle r)
public Point getView(Point p)
public Dimension getView(Dimension dim)
public Rectangle getView(Rectangle r)
public void repaint()
repaint
in class GObject
public void setDisplayMessage(String s)
s
- the string message.public Dimension getPreferredSize()
getPreferredSize
in class Component
public void setPreferredSize(int x, int y)
x
- widthy
- heightpublic void setPreferredSize(Dimension dim)
dim
- the Dimensionpublic void paint(Graphics g)
paint
in class Component
g
- the graphics.public Component getFirstComponentAt(Point p)
p
- the point
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |