|
SGT Home | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
Defines the basic sgt Pane functionality. Pane and
JPane implement the AbstractPane
interface.
Pane,
JPane| Field Summary | |
static int |
BOTTOM
Align to bottom of printer page. |
static int |
CENTER
Align to center of printer page. |
static int |
DEFAULT_SCALE
Default scale for printing. |
static int |
LEFT
Align to left of printer page. |
static int |
MIDDLE
Align to middle of printer page. |
static int |
RIGHT
Align to right of printer page. |
static int |
SHRINK_TO_FIT
Shrink to fit onto printer page. |
static int |
SPECIFIED_LOCATION
Align to location specified on printer page. |
static int |
TO_FIT
Fit onto printer page. |
static int |
TOP
Align to top of printer page. |
| Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Add a PropertyChangeListener to the list. |
void |
draw()
The AbstractPane and all of the attached Classes
will be drawn. |
void |
draw(java.awt.Graphics g)
The AbstractPane and all of the attached Classes
will be drawn. |
void |
draw(java.awt.Graphics g,
int width,
int height)
The AbstractPane and all of the attached Classes
will be drawn. |
java.awt.Rectangle |
getBounds()
Get the bounding rectangle in pixels (device units). |
java.awt.Component |
getComponent()
Get the Component associated with
the pane. |
Layer |
getFirstLayer()
Get the first Layer associated with the Pane |
java.lang.String |
getId()
Get the Pane identifier. |
Layer |
getLayer(java.lang.String id)
Get the Layer associated with the
Pane indicated by the id. |
Layer |
getLayerFromDataId(java.lang.String id)
Get the Layer associated with the
Pane indicated by the data id. |
java.lang.Object |
getObjectAt(int x,
int y)
Get the current selected object at a point. |
java.lang.Object[] |
getObjectsAt(int x,
int y)
Return an array of objects whose bounds include x,y. |
java.lang.Object[] |
getObjectsAt(java.awt.Point pt)
Return an array of objects whose bounds are at point pt. |
int |
getPageHAlign()
Get horizontal alignment for printing. |
java.awt.Point |
getPageOrigin()
Get the printer page origin. |
int |
getPageScaleMode()
Get printing scale mode. |
java.awt.Dimension |
getPageSize()
Get the printer page size. |
int |
getPageVAlign()
Get vertical alignment for printing. |
java.lang.Object |
getSelectedObject()
Return the last object selected. |
java.awt.Rectangle |
getZoomBounds()
Return the device coordinates of the zoom action. |
java.awt.Point |
getZoomStart()
Return the device coordinates of the start of the zoom action. |
void |
init()
This method is called when the AbstractPane first becomes
visible. |
boolean |
isBatch()
Is batching turned on? |
boolean |
isModified()
Has the plot been modified? |
boolean |
isMouseEventsEnabled()
Are MouseEvents enabled for processing by SGT? |
boolean |
isPrinter()
Test if the current Graphics object is a printer. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Remove the PropertyChangeListener from the list. |
void |
setBatch(boolean batch)
Turn on/off batching of updates to the pane. |
void |
setBatch(boolean batch,
java.lang.String msg)
Turn on/off batching of updates to the pane. |
void |
setId(java.lang.String id)
Set the Pane identifier |
void |
setModified(boolean mod,
java.lang.String mess)
Notify the pane that something has changed and a redraw is required. |
void |
setMouseEventsEnabled(boolean enable)
Enable/disable the handling of MouseEvents by
SGT. |
void |
setPageAlign(int vert,
int horz)
Set alignment for printing. |
void |
setPageHAlign(int horz)
Set horizontal alignment for printing. |
void |
setPageOrigin(java.awt.Point p)
Set the printer page origin. |
void |
setPageScaleMode(int mode)
Set printing scale mode. |
void |
setPageVAlign(int vert)
Set vertical alignment for printing. |
void |
setSelectedObject(java.lang.Object obj)
Primarily used internally by sgt. |
| Field Detail |
public static final int TOP
public static final int MIDDLE
public static final int BOTTOM
public static final int LEFT
public static final int CENTER
public static final int RIGHT
public static final int SPECIFIED_LOCATION
public static final int TO_FIT
public static final int DEFAULT_SCALE
public static final int SHRINK_TO_FIT
| Method Detail |
public void draw()
AbstractPane and all of the attached Classes
will be drawn. Drawing will occur in an offscreen image and then
copied to the screen. A new offscreen image is created on the
first call to draw() or if the size of the pane has been
changed. The offscreen image will be used as a "double" buffer
when the screen requires redrawing.
Each Layer that has been added will be drawn in the
order added, except if that order has been change using the
moveLayerUp() or moveLayerDown() methods.
Graphics,
Layerpublic void draw(java.awt.Graphics g)
AbstractPane and all of the attached Classes
will be drawn. Drawing will occur using the supplied
Graphics object.
g - User supplied Graphics objectGraphics
public void draw(java.awt.Graphics g,
int width,
int height)
AbstractPane and all of the attached Classes
will be drawn. Drawing will occur using the supplied
Graphics object. And clipping will be done to the
width and height.
g - User supplied Graphics objectwidth - clipping widthheight - clipping heightGraphicspublic void init()
AbstractPane first becomes
visible. The types of operations that should be implemented here include
those that require a valid Graphics object.
public boolean isPrinter()
Graphics object is a printer.
public java.lang.Object[] getObjectsAt(int x,
int y)
public java.lang.Object[] getObjectsAt(java.awt.Point pt)
public java.awt.Dimension getPageSize()
public java.lang.String getId()
Pane identifier.
String containing the Pane identifier.public void setId(java.lang.String id)
Pane identifier
public void setPageScaleMode(int mode)
TO_FIT,
SHRINK_TO_FIT and
DEFAULT_SCALE. Default = DEFAULT_SCALE.
mode - print page scalingDEFAULT_SCALE,
TO_FIT,
SHRINK_TO_FIT
public void setPageAlign(int vert,
int horz)
vert - vertical alignmenthorz - horizontal alignmentTOP,
MIDDLE,
BOTTOM,
LEFT,
CENTER,
RIGHT,
SPECIFIED_LOCATIONpublic void setPageVAlign(int vert)
TOP,
MIDDLE, and BOTTOM for vert and
LEFT, CENTER, and RIGHT
for horz. Either can be SPECIFIED_LOCATION.
vert - vertical alignmentTOP,
MIDDLE,
BOTTOM,
SPECIFIED_LOCATIONpublic void setPageHAlign(int horz)
TOP,
MIDDLE, and BOTTOM.
horz - horizontal alignmentLEFT,
CENTER,
RIGHT,
SPECIFIED_LOCATIONpublic int getPageScaleMode()
DEFAULT_SCALE,
TO_FIT,
SHRINK_TO_FITpublic int getPageVAlign()
LEFT, CENTER, and RIGHT.
TOP,
MIDDLE,
BOTTOM,
SPECIFIED_LOCATIONpublic int getPageHAlign()
LEFT,
CENTER,
RIGHT,
SPECIFIED_LOCATIONpublic void setPageOrigin(java.awt.Point p)
SPECIFIED_LOCATION or
VAlign = SPECIFIED_LOCATION.
public java.awt.Point getPageOrigin()
SPECIFIED_LOCATION or
VAlign = SPECIFIED_LOCATION.
public Layer getFirstLayer()
Layer associated with the Pane
Layer object
public Layer getLayer(java.lang.String id)
throws LayerNotFoundException
Layer associated with the
Pane indicated by the id.
id - identifier.
LayerNotFoundException - The Layer indicated by the id was not found.
public Layer getLayerFromDataId(java.lang.String id)
throws LayerNotFoundException
Layer associated with the
Pane indicated by the data id.
id - data identifier
LayerNotFoundException - The Layer indicated by the id was not found.SGTDatapublic java.lang.Object getSelectedObject()
Layers currently connected to the
pane. AbstractPane tests
each layer after a MOUSE_DOWN event for an object whose bounding box
contains the mouse. The pane object then passes the event on to the next
level.
public void setSelectedObject(java.lang.Object obj)
public java.awt.Rectangle getZoomBounds()
public java.awt.Point getZoomStart()
Point
is in device coordinates and may require transformation to physical units
or user units. Zoom start may be useful to indicate which graph to zoom.
public java.lang.Object getObjectAt(int x,
int y)
public java.awt.Rectangle getBounds()
public java.awt.Component getComponent()
Component associated with
the pane.
public void setBatch(boolean batch,
java.lang.String msg)
true property change events will
not cause pane to redraw. When batching is
turned back on if the pane has been modified it
will then redraw.
public void setBatch(boolean batch)
true property change events will
not cause pane to redraw. When batching is
turned back on if the pane has been modified it
will then redraw.
public boolean isBatch()
public void setModified(boolean mod,
java.lang.String mess)
public boolean isModified()
public void setMouseEventsEnabled(boolean enable)
MouseEvents by
SGT. Disabling mouse events will turn off object selection,
moveable, selectable, draggable, and zooming.
public boolean isMouseEventsEnabled()
MouseEvents enabled for processing by SGT?
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Pane and JPane include
"objectSelected" and "zoomRectangle".
public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
|
SGT Home | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||