|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.sdedit.diagram.PaintDevice
net.sf.sdedit.ui.PanelPaintDevice
public class PanelPaintDevice
A PanelPaintDevice is a PaintDevice implementation that uses a JPanel (see getPanel()) for displaying diagrams. Its main benefit is that - in contrast to other PaintDevice implementations - it does not allocate extra memory.
| Field Summary |
|---|
| Fields inherited from interface net.sf.sdedit.Constants |
|---|
ACTIVE_LIFELINE_COLOR, ANTI_ALIAS, dashed, DEFAULT_CODE_FONT, DEFAULT_CURSOR, DEFAULT_ENCODING_SCHEME, dotted, emptyStroke, GLOBAL_CONF_FILE, HAND_CURSOR, MOVE_CURSOR, SAVE_AS_FILE_PROPERTY, SAVE_AS_TYPE_PROPERTY, solid, TEST_FREEHEP_CLASSNAME, thick, thick_dashed, THREAD_COLORS |
| Constructor Summary | |
|---|---|
PanelPaintDevice(boolean interactive)
Creates a new PanelPaintDevice. |
|
| Method Summary | |
|---|---|
void |
addListener(PanelPaintDeviceListener ppdl)
Adds a PanelPaintDeviceListener that will be notified when the mouse enters, exits or clicks drawable objects |
void |
close()
This method is called once when no Drawable object will be added anymore. |
Zoomable<JPanel> |
getPanel()
Returns the panel for displaying the diagram. |
int |
getTextHeight(boolean bold)
|
int |
getTextWidth(String text,
boolean bold)
|
boolean |
isBlank()
|
void |
mouseClicked(MouseEvent e)
Notifies all PanelPaintDeviceListeners when the mouse has clicked a drawable object. |
void |
mouseDragged(MouseEvent e)
|
void |
mouseEntered(MouseEvent e)
|
void |
mouseExited(MouseEvent e)
|
void |
mouseMoved(MouseEvent e)
This method is called when the mouse moved over the panel. |
void |
mousePressed(MouseEvent e)
|
void |
mouseReleased(MouseEvent e)
|
void |
setAntialiasing(boolean on)
|
void |
setDiagram(Diagram diagram)
|
| Methods inherited from class net.sf.sdedit.diagram.PaintDevice |
|---|
addOtherDrawable, addSequenceElement, announce, clear, computeAxes, computeBounds, getColor, getDiagram, getFont, getHeight, getRightBound, getTextHeight, getTextWidth, getWidth, isEmpty, iterator, reinitialize, writeToStream |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PanelPaintDevice(boolean interactive)
interactive - flag denoting if the PanelPaintDevice is
interactive, meaning that it reacts to mouse movement and
clicks| Method Detail |
|---|
public void setDiagram(Diagram diagram)
setDiagram in class PaintDevicepublic void mouseMoved(MouseEvent e)
mouseMoved in interface MouseMotionListenere - public void addListener(PanelPaintDeviceListener ppdl)
ppdl - a a PanelPaintDeviceListenerpublic void close()
PaintDevice
close in class PaintDevicePaintDevice.close()public int getTextHeight(boolean bold)
getTextHeight in class PaintDevicePaintDevice.getTextHeight(boolean)
public int getTextWidth(String text,
boolean bold)
getTextWidth in class PaintDevicePaintDevice.getTextWidth(java.lang.String,
boolean)public Zoomable<JPanel> getPanel()
public void setAntialiasing(boolean on)
public boolean isBlank()
public void mouseClicked(MouseEvent e)
mouseClicked in interface MouseListenere - public void mouseDragged(MouseEvent e)
mouseDragged in interface MouseMotionListenerMouseMotionListener.mouseDragged(java.awt.event.MouseEvent)public void mouseEntered(MouseEvent e)
mouseEntered in interface MouseListenerMouseListener.mouseEntered(java.awt.event.MouseEvent)public void mouseExited(MouseEvent e)
mouseExited in interface MouseListenerMouseListener.mouseExited(java.awt.event.MouseEvent)public void mousePressed(MouseEvent e)
mousePressed in interface MouseListenerMouseListener.mousePressed(java.awt.event.MouseEvent)public void mouseReleased(MouseEvent e)
mouseReleased in interface MouseListenerMouseListener.mouseReleased(java.awt.event.MouseEvent)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||