|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.cosylab.vdct.graphics.Decorator
com.cosylab.vdct.graphics.DrawingSurface
public final class DrawingSurface
Insert the type's description here. Creation date: (10.12.2000 13:19:16)
Field Summary | |
---|---|
protected static java.lang.String |
untitledString
|
Fields inherited from interface java.awt.print.Pageable |
---|
UNKNOWN_NUMBER_OF_PAGES |
Fields inherited from interface java.awt.print.Printable |
---|
NO_SUCH_PAGE, PAGE_EXISTS |
Constructor Summary | |
---|---|
DrawingSurface(java.lang.Object id,
int serialNumber,
InternalFrameInterface displayer,
CopyContext copyContext)
displayer can be null when no gui is linked to this. |
Method Summary | |
---|---|
void |
addAction(ActionObject action)
Insert the method's description here. |
static void |
applyPortAndMacroConnectors(java.lang.Object dsId,
DBData dbData,
VDBData vdbData)
|
static java.util.HashMap |
applyVisualData(java.lang.Object dsId,
boolean importDB,
Group group,
DBData dbData,
VDBData vdbData)
Insert the method's description here. |
void |
ascendFromTemplate()
Insert the method's description here. |
void |
baseView()
Insert the method's description here. |
void |
centerObject(VisibleObject object)
Insert the method's description here. |
void |
checkForIncodedDBDs(java.io.File file)
jh Creation date: (6.1.2001 22:35:40) |
boolean |
close()
|
Macro |
createMacro(VDBMacro vdbMacro)
Insert the method's description here. |
void |
createPort(VDBPort vdbPort)
Insert the method's description here. |
void |
createTemplateInstance(java.lang.String name,
java.lang.String type,
boolean relative)
Insert the method's description here. |
void |
descendIntoTemplate(Template template)
Insert the method's description here. |
void |
draw(java.awt.Graphics g)
Insert the method's description here. |
void |
generateMacros()
Searches for undefined macros |
int |
getComponentHeight()
Insert the method's description here. |
int |
getComponentWidth()
Insert the method's description here. |
InternalFrameInterface |
getDisplayer()
|
java.lang.Object |
getDsId()
|
DSGUIInterface |
getGuimenu()
|
int |
getNumberOfPages()
Returns the number of pages in the set. |
java.awt.print.PageFormat |
getPageFormat(int pageIndex)
Returns the PageFormat of the page specified by
pageIndex . |
int |
getPressedX()
Insert the method's description here. |
int |
getPressedY()
Insert the method's description here. |
java.awt.print.Printable |
getPrintable(int pageIndex)
Returns the Printable instance responsible for
rendering the page specified by pageIndex . |
VDBTemplate |
getTemplate()
|
java.util.Stack |
getTemplateStack()
Returns the templateStack. |
java.lang.String |
getTitle()
|
ViewState |
getView()
Insert the method's description here. |
Group |
getViewGroup()
Insert the method's description here. |
boolean |
importBorder(java.io.File file)
|
boolean |
importDB(java.io.File file)
SEPARATE DOWN CODE TO METHODS Creation date: (6.1.2001 22:35:40) |
boolean |
importFields(java.io.File file,
boolean ignoreLinkFields)
Import the fields from a .db file (option to ignore database link fields). |
void |
initializeWorkspace()
Insert the method's description here. |
boolean |
isDisposed()
|
boolean |
isFlat()
Insert the method's description here. |
boolean |
isModified()
Insert the method's description here. |
boolean |
isPrinting()
|
boolean |
isTemplateAllowed(VDBTemplate template)
Returns true if a template instance of the given template can be added as an element to currently edited template. |
boolean |
isTemplateChanged()
|
void |
linkCommand(VisibleObject linkObject,
LinkSource linkData)
Insert the method's description here. |
static void |
loadBlackOnWhiteColorScheme()
Loads black on white color cheme |
boolean |
loadRdbDbGroup(javax.swing.JFrame guiContext)
|
static void |
loadWhiteOnBlackColorScheme()
Loads white on black color cheme |
void |
mouseClicked(java.awt.event.MouseEvent e)
Invoked when the mouse has been clicked on a component. |
void |
mouseDragged(java.awt.event.MouseEvent e)
Invoked when a mouse button is pressed on a component and then dragged. |
void |
mouseEntered(java.awt.event.MouseEvent e)
Invoked when the mouse enters a component. |
void |
mouseExited(java.awt.event.MouseEvent e)
Invoked when the mouse exits a component. |
void |
mouseMoved(java.awt.event.MouseEvent e)
Invoked when the mouse button has been moved on a component (with no buttons no down). |
void |
mousePressed(java.awt.event.MouseEvent e)
Invoked when a mouse button has been pressed on a component. |
void |
mouseReleased(java.awt.event.MouseEvent e)
Invoked when a mouse button has been released on a component. |
void |
moveLevelUp()
Insert the method's description here. |
void |
moveToGroup(Group group)
Insert the method's description here. |
boolean |
open(java.io.File file)
Insert the method's description here. |
boolean |
open(java.io.File file,
boolean importDB)
Insert the method's description here. |
boolean |
open(java.io.File file,
boolean importDB,
boolean importToCurrentGroup)
|
boolean |
open(java.io.InputStream is,
java.io.File file,
boolean importDB,
boolean importToCurrentGroup)
SEPARATE DOWN CODE TO METHODS Creation date: (6.1.2001 22:35:40) |
boolean |
openDBD(java.io.File file)
Insert the method's description here. |
boolean |
openDBD(java.io.File file,
boolean importDBD)
Insert the method's description here. |
boolean |
prepareTemplateLeave()
true - OK, false - denied |
int |
print(java.awt.Graphics graphics,
java.awt.print.PageFormat pageFormat,
int pageIndex)
Prints the page at the specified index into the specified Graphics context in the specified
format. |
void |
recalculateNavigatorPosition()
Insert the method's description here. |
boolean |
reloadTemplate(VDBTemplate data)
|
void |
repaint()
Insert the method's description here. |
void |
repaint(boolean drawOnlyHilitedOnce)
Insert the method's description here. |
void |
reset()
|
void |
resetDraggedPosition()
|
void |
resize(int x0,
int y0,
int width,
int height)
Insert the method's description here. |
void |
run()
DrawingSurface thread. |
boolean |
saveRdbGroup(javax.swing.JFrame guiContext,
RdbDataId rdbId,
boolean dialog)
|
void |
setBlockNavigatorRedrawOnce(boolean blockNavigatorRedrawOnce)
Sets the blockNavigatorRedrawOnce. |
void |
setDisposed(boolean disposed)
|
void |
setModified(boolean newModified)
Insert the method's description here. |
void |
setPressedMousePos(int x,
int y)
|
void |
setScale(double scale)
Insert the method's description here. |
void |
templateReloadPostInit()
|
void |
updateFile(java.io.File file)
|
void |
updateWorkspaceGroup()
Insert the method's description here. |
void |
updateWorkspaceScale()
Insert the method's description here. |
void |
zoomArea(int x1,
int y1,
int x2,
int y2)
Insert the method's description here. |
Methods inherited from class com.cosylab.vdct.graphics.Decorator |
---|
getComponent, setComponent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String untitledString
Constructor Detail |
---|
public DrawingSurface(java.lang.Object id, int serialNumber, InternalFrameInterface displayer, CopyContext copyContext)
Method Detail |
---|
public void addAction(ActionObject action)
action
- com.cosylab.vdct.undo.ActionObjectpublic void baseView()
public void draw(java.awt.Graphics g)
draw
in interface VisualComponent
draw
in class Decorator
public int getComponentHeight()
getComponentHeight
in interface VisualComponent
getComponentHeight
in class Decorator
public int getComponentWidth()
getComponentWidth
in interface VisualComponent
getComponentWidth
in class Decorator
public int getNumberOfPages()
Pageable
implementations return the true number of pages
rather than the
UNKNOWN_NUMBER_OF_PAGES constant.
getNumberOfPages
in interface java.awt.print.Pageable
Pageable
.public java.awt.print.PageFormat getPageFormat(int pageIndex) throws java.lang.IndexOutOfBoundsException
PageFormat
of the page specified by
pageIndex
.
getPageFormat
in interface java.awt.print.Pageable
pageIndex
- the zero based index of the page whose
PageFormat
is being requested
PageFormat
describing the size and
orientation.
IndexOutOfBoundsException
- the Pageable
does not contain the requested
page.
java.lang.IndexOutOfBoundsException
public int getPressedX()
public int getPressedY()
public void resetDraggedPosition()
public java.awt.print.Printable getPrintable(int pageIndex) throws java.lang.IndexOutOfBoundsException
Printable
instance responsible for
rendering the page specified by pageIndex
.
getPrintable
in interface java.awt.print.Pageable
pageIndex
- the zero based index of the page whose
Printable
is being requested
Printable
that renders the page.
IndexOutOfBoundsException
- the Pageable
does not contain the requested
page.
java.lang.IndexOutOfBoundsException
public ViewState getView()
public Group getViewGroup()
public void initializeWorkspace()
public boolean isFlat()
public boolean isModified()
isModified
in interface DrawingSurfaceInterface
public void linkCommand(VisibleObject linkObject, LinkSource linkData)
linkCommand
in interface LinkCommandInterface
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
public void moveLevelUp()
public boolean open(java.io.File file) throws java.io.IOException
file
- java.io.File
java.io.IOException
public boolean open(java.io.File file, boolean importDB) throws java.io.IOException
open
in interface DrawingSurfaceInterface
file
- java.io.File
java.io.IOException
public void checkForIncodedDBDs(java.io.File file) throws java.io.IOException
java.io.IOException
public boolean importFields(java.io.File file, boolean ignoreLinkFields)
public boolean importBorder(java.io.File file)
public boolean open(java.io.File file, boolean importDB, boolean importToCurrentGroup) throws java.io.IOException
java.io.IOException
public boolean open(java.io.InputStream is, java.io.File file, boolean importDB, boolean importToCurrentGroup) throws java.io.IOException
file
- java.io.File
java.io.IOException
public boolean loadRdbDbGroup(javax.swing.JFrame guiContext)
public boolean saveRdbGroup(javax.swing.JFrame guiContext, RdbDataId rdbId, boolean dialog)
public boolean importDB(java.io.File file) throws java.io.IOException
file
- java.io.File
java.io.IOException
public static void applyPortAndMacroConnectors(java.lang.Object dsId, DBData dbData, VDBData vdbData)
public static java.util.HashMap applyVisualData(java.lang.Object dsId, boolean importDB, Group group, DBData dbData, VDBData vdbData)
public boolean openDBD(java.io.File file) throws java.io.IOException
file
- java.io.File
java.io.IOException
public boolean openDBD(java.io.File file, boolean importDBD) throws java.io.IOException
file
- java.io.File
java.io.IOException
public int print(java.awt.Graphics graphics, java.awt.print.PageFormat pageFormat, int pageIndex) throws java.awt.print.PrinterException
Graphics
context in the specified
format. A PrinterJob
calls the
Printable
interface to request that a page be
rendered into the context specified by
graphics
. The format of the page to be drawn is
specified by pageFormat
. The zero based index
of the requested page is specified by pageIndex
.
If the requested page does not exist then this method returns
NO_SUCH_PAGE; otherwise PAGE_EXISTS is returned.
The Graphics
class or subclass implements the
PrinterGraphics
interface to provide additional
information. If the Printable
object
aborts the print job then it throws a PrinterException
.
print
in interface java.awt.print.Printable
graphics
- the context into which the page is drawnpageFormat
- the size and orientation of the page being drawnpageIndex
- the zero based index of the page to be drawn
pageIndex
specifies a
non-existent page.
java.awt.print.PrinterException
- thrown when the print job is terminated.public void recalculateNavigatorPosition()
public void run()
repaint()
method is called very often
(e.g. 100-times per second). Drawing at such rate is non-sence.
The idea is to repaint whole workspace at maximum rate of 10 repaints/second.
run
in interface java.lang.Runnable
Runnable.run()
public void repaint(boolean drawOnlyHilitedOnce)
public void repaint()
public void resize(int x0, int y0, int width, int height)
resize
in interface VisualComponent
resize
in class Decorator
public void setModified(boolean newModified)
newModified
- booleanpublic void setScale(double scale)
scale
- doublepublic void centerObject(VisibleObject object)
scale
- doublepublic void updateWorkspaceScale()
public void zoomArea(int x1, int y1, int x2, int y2)
x1
- inty1
- intx2
- inty2
- intpublic void createTemplateInstance(java.lang.String name, java.lang.String type, boolean relative)
name
- java.lang.Stringtype
- java.lang.Stringrelative
- booleanpublic boolean prepareTemplateLeave()
public void templateReloadPostInit()
public void descendIntoTemplate(Template template)
template
- com.cosylab.vdct.graphics.objects.Templatepublic void ascendFromTemplate()
template
- com.cosylab.vdct.graphics.objects.Templatepublic void moveToGroup(Group group)
group
- com.cosylab.vdct.graphics.objects.Grouppublic void updateWorkspaceGroup()
public java.util.Stack getTemplateStack()
public boolean reloadTemplate(VDBTemplate data)
reloadTemplate
in interface DrawingSurfaceInterface
public void setBlockNavigatorRedrawOnce(boolean blockNavigatorRedrawOnce)
blockNavigatorRedrawOnce
- The blockNavigatorRedrawOnce to setpublic static void loadWhiteOnBlackColorScheme()
public static void loadBlackOnWhiteColorScheme()
public void createPort(VDBPort vdbPort)
name
- java.lang.Stringpublic Macro createMacro(VDBMacro vdbMacro)
name
- java.lang.Stringpublic void generateMacros()
public boolean isPrinting()
public void reset()
public void setPressedMousePos(int x, int y)
pressedMousePosValid
- the pressedMousePosValid to setpublic DSGUIInterface getGuimenu()
public java.lang.Object getDsId()
getDsId
in interface DrawingSurfaceInterface
public boolean isDisposed()
public void setDisposed(boolean disposed)
public void updateFile(java.io.File file)
public java.lang.String getTitle()
getTitle
in interface DrawingSurfaceInterface
public boolean close()
close
in interface DrawingSurfaceInterface
public InternalFrameInterface getDisplayer()
public boolean isTemplateChanged()
isTemplateChanged
in interface DrawingSurfaceInterface
public VDBTemplate getTemplate()
getTemplate
in interface DrawingSurfaceInterface
public boolean isTemplateAllowed(VDBTemplate template)
isTemplateAllowed
in interface DrawingSurfaceInterface
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |