com.cosylab.vdct.graphics
Class DsManager

java.lang.Object
  extended by com.cosylab.vdct.graphics.DsManager
All Implemented Interfaces:
DsManagerInterface, GUIMenuInterface, LinkCommandInterface, RepaintInterface, VDBInterface, java.awt.print.Pageable

public class DsManager
extends java.lang.Object
implements DsManagerInterface, GUIMenuInterface, VDBInterface, LinkCommandInterface, RepaintInterface, java.awt.print.Pageable

Author:
ssah

Field Summary
protected  CopyContext copyContext
           
protected  DesktopInterface desktopInterface
           
protected static java.util.HashMap drawingSurfaces
           
protected  int dsCount
           
protected  java.util.Vector dsEventListeners
           
protected  DSGUIInterface dsInterface
           
protected static DsManager instance
           
 
Fields inherited from interface java.awt.print.Pageable
UNKNOWN_NUMBER_OF_PAGES
 
Constructor Summary
DsManager(DesktopInterface desktopInterface)
           
 
Method Summary
 VisualComponent addDrawingSurface(java.lang.Object id, InternalFrameInterface displayer)
           
 void addDsEventListener(DsEventListener listener)
           
 void baseView()
          Insert the method's description here.
 java.lang.String checkGroupName(java.lang.String name, boolean relative)
          Returns error message or null if OK Creation date: (3.2.2001 22:11:01)
 java.lang.String checkRecordName(java.lang.String name, java.lang.String oldName, boolean relative)
          Returns error message or null if OK.
 void close()
           
 void closeAll()
           
 void closeDrawingSurface(java.lang.Object id)
           
 void copy()
          Insert the method's description here.
 Box createBox()
          Insert the method's description here.
 void createDummyDrawingSurface()
           
 Line createLine()
           
 void createRecord(java.lang.String name, java.lang.String type, boolean relative)
           
 TextBox createTextBox()
           
 void cut()
          Insert the method's description here.
 void delete()
          Insert the method's description here.
 void export(java.io.File file)
          Insert the method's description here.
 void exportAsGroup(java.io.File file)
          Insert the method's description here.
static java.util.Vector getAllDrawingSurfaces()
           
static DrawingSurface getDrawingSurface()
           
static DrawingSurface getDrawingSurface(java.lang.Object id)
           
 DrawingSurfaceInterface getDrawingSurfaceById(java.lang.Object id)
           
 DrawingSurfaceInterface[] getDrawingSurfaces()
           
 DrawingSurfaceInterface getFocusedDrawingSurface()
           
 int getNumberOfPages()
           
 java.awt.print.PageFormat getPageFormat(int pageIndex)
           
 java.awt.print.Printable getPrintable(int pageIndex)
           
 void group(java.lang.String groupName)
          Insert the method's description here.
 void importBorder(java.io.File file)
          Insert the method's description here.
 void importDB(java.io.File file)
          Insert the method's description here.
 void importDBD(java.io.File file)
          Insert the method's description here.
 void importFields(java.io.File file)
          Insert the method's description here.
 void importTemplateDB(java.io.File file)
          Insert the method's description here.
 boolean isErrorMessage(java.lang.String message)
          Returns true if the string returned by checkGroupName(...) and checkRecordName(...) is an error message and false when it is a warning.
 boolean isMacroPortsIDChanged()
           
 boolean isModified()
          Insert the method's description here.
 void levelUp()
          Insert the method's description here.
 void linkCommand(VisibleObject linkObject, LinkSource linkData)
           
 void loadRdbGroup(javax.swing.JFrame guiContext)
           
 void morph()
           
 void morph(java.lang.String name, java.lang.String newType)
           
 void moveOrigin(int direction)
          Insert the method's description here.
 void newCmd()
          Insert the method's description here.
 void openDB(java.io.File file)
          Insert the method's description here.
 void openDBD(java.io.File file)
          Insert the method's description here.
 void paste()
          Insert the method's description here.
 void pasteAtPosition(int pX, int pY)
          Insert the method's description here.
 void print()
          Insert the method's description here.
 void redo()
          Insert the method's description here.
 void removeDrawingSurface(java.lang.Object id)
           
 void removeDsEventListener(DsEventListener listener)
           
 void rename()
          Insert the method's description here.
 void rename(java.lang.String oldName, java.lang.String newName)
          Insert the method's description here.
 void repaint(boolean highlighted)
           
 void repaintAll(boolean highlighted)
           
 void reset()
           
 void save(java.io.File file)
          Insert the method's description here.
 void saveAsGroup(java.io.File file)
          Insert the method's description here.
 void saveAsTemplate(java.io.File file)
          Insert the method's description here.
 void saveRdbGroup(javax.swing.JFrame guiContext, boolean dialog)
           
 void selectAll()
          Insert the method's description here.
 void setFlatView(boolean state)
          Insert the method's description here.
 void setFocusedDrawingSurface(java.lang.Object id)
           
 void setScale(double scale)
          Insert the method's description here.
 void showGrid(boolean state)
          Insert the method's description here.
 void showNavigator(boolean state)
          Insert the method's description here.
 void smartZoom()
          Insert the method's description here.
 void snapToGrid(boolean state)
          Insert the method's description here.
 void systemCopy()
           
 void systemPaste()
           
 void undo()
          Insert the method's description here.
 void ungroup()
          Insert the method's description here.
 void updateGroupLabel()
          Insert the method's description here.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

protected static DsManager instance

dsInterface

protected DSGUIInterface dsInterface

drawingSurfaces

protected static java.util.HashMap drawingSurfaces

desktopInterface

protected DesktopInterface desktopInterface

copyContext

protected CopyContext copyContext

dsEventListeners

protected java.util.Vector dsEventListeners

dsCount

protected int dsCount
Constructor Detail

DsManager

public DsManager(DesktopInterface desktopInterface)
Method Detail

getDrawingSurface

public static DrawingSurface getDrawingSurface()

getDrawingSurface

public static DrawingSurface getDrawingSurface(java.lang.Object id)

getAllDrawingSurfaces

public static java.util.Vector getAllDrawingSurfaces()

createDummyDrawingSurface

public void createDummyDrawingSurface()

addDrawingSurface

public VisualComponent addDrawingSurface(java.lang.Object id,
                                         InternalFrameInterface displayer)
Specified by:
addDrawingSurface in interface DsManagerInterface

getDrawingSurfaceById

public DrawingSurfaceInterface getDrawingSurfaceById(java.lang.Object id)
Specified by:
getDrawingSurfaceById in interface DsManagerInterface

removeDrawingSurface

public void removeDrawingSurface(java.lang.Object id)
Specified by:
removeDrawingSurface in interface DsManagerInterface

getFocusedDrawingSurface

public DrawingSurfaceInterface getFocusedDrawingSurface()
Specified by:
getFocusedDrawingSurface in interface DsManagerInterface

setFocusedDrawingSurface

public void setFocusedDrawingSurface(java.lang.Object id)
Specified by:
setFocusedDrawingSurface in interface DsManagerInterface

getDrawingSurfaces

public DrawingSurfaceInterface[] getDrawingSurfaces()
Specified by:
getDrawingSurfaces in interface DsManagerInterface

closeDrawingSurface

public void closeDrawingSurface(java.lang.Object id)
Specified by:
closeDrawingSurface in interface DsManagerInterface

addDsEventListener

public void addDsEventListener(DsEventListener listener)
Specified by:
addDsEventListener in interface DsManagerInterface

removeDsEventListener

public void removeDsEventListener(DsEventListener listener)
Specified by:
removeDsEventListener in interface DsManagerInterface

linkCommand

public void linkCommand(VisibleObject linkObject,
                        LinkSource linkData)
Specified by:
linkCommand in interface LinkCommandInterface

checkGroupName

public java.lang.String checkGroupName(java.lang.String name,
                                       boolean relative)
Description copied from interface: VDBInterface
Returns error message or null if OK Creation date: (3.2.2001 22:11:01)

Specified by:
checkGroupName in interface VDBInterface
Parameters:
name - java.lang.String
Returns:
java.lang.String

checkRecordName

public java.lang.String checkRecordName(java.lang.String name,
                                        java.lang.String oldName,
                                        boolean relative)
Description copied from interface: VDBInterface
Returns error message or null if OK. oldName can be null if not applicable. Creation date: (3.2.2001 22:11:01)

Specified by:
checkRecordName in interface VDBInterface
Parameters:
name - java.lang.String
Returns:
java.lang.String

createBox

public Box createBox()
Description copied from interface: VDBInterface
Insert the method's description here. Creation date: (3.2.2001 23:27:30)

Specified by:
createBox in interface VDBInterface

createLine

public Line createLine()
Specified by:
createLine in interface VDBInterface

createRecord

public void createRecord(java.lang.String name,
                         java.lang.String type,
                         boolean relative)
Specified by:
createRecord in interface VDBInterface

createTextBox

public TextBox createTextBox()
Specified by:
createTextBox in interface VDBInterface

isErrorMessage

public boolean isErrorMessage(java.lang.String message)
Description copied from interface: VDBInterface
Returns true if the string returned by checkGroupName(...) and checkRecordName(...) is an error message and false when it is a warning.

Specified by:
isErrorMessage in interface VDBInterface

baseView

public void baseView()
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:12:21)

Specified by:
baseView in interface GUIMenuInterface

copy

public void copy()
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:07:46)

Specified by:
copy in interface GUIMenuInterface

cut

public void cut()
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:07:40)

Specified by:
cut in interface GUIMenuInterface

delete

public void delete()
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:08:30)

Specified by:
delete in interface GUIMenuInterface

export

public void export(java.io.File file)
            throws java.io.IOException
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:48:15)

Specified by:
export in interface GUIMenuInterface
Parameters:
file - java.io.File
Throws:
java.io.IOException - The exception description.

exportAsGroup

public void exportAsGroup(java.io.File file)
                   throws java.io.IOException
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:11:04)

Specified by:
exportAsGroup in interface GUIMenuInterface
Parameters:
file - java.io.File
Throws:
java.io.IOException - The exception description.

group

public void group(java.lang.String groupName)
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:08:14)

Specified by:
group in interface GUIMenuInterface

importBorder

public void importBorder(java.io.File file)
                  throws java.io.IOException
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:10:27)

Specified by:
importBorder in interface GUIMenuInterface
Parameters:
file - java.io.File
Throws:
java.io.IOException - The exception description.

importDB

public void importDB(java.io.File file)
              throws java.io.IOException
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:10:27)

Specified by:
importDB in interface GUIMenuInterface
Parameters:
file - java.io.File
Throws:
java.io.IOException - The exception description.

importDBD

public void importDBD(java.io.File file)
               throws java.io.IOException
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:10:38)

Specified by:
importDBD in interface GUIMenuInterface
Parameters:
file - java.io.File
Throws:
java.io.IOException - The exception description.

importFields

public void importFields(java.io.File file)
                  throws java.io.IOException
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:10:27)

Specified by:
importFields in interface GUIMenuInterface
Parameters:
file - java.io.File
Throws:
java.io.IOException - The exception description.

importTemplateDB

public void importTemplateDB(java.io.File file)
                      throws java.io.IOException
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:10:27)

Specified by:
importTemplateDB in interface GUIMenuInterface
Parameters:
file - java.io.File
Throws:
java.io.IOException - The exception description.

isModified

public boolean isModified()
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (29.4.2001 11:37:15)

Specified by:
isModified in interface GUIMenuInterface
Returns:
boolean

isMacroPortsIDChanged

public boolean isMacroPortsIDChanged()
Specified by:
isMacroPortsIDChanged in interface GUIMenuInterface

levelUp

public void levelUp()
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:11:41)

Specified by:
levelUp in interface GUIMenuInterface

loadRdbGroup

public void loadRdbGroup(javax.swing.JFrame guiContext)
Specified by:
loadRdbGroup in interface GUIMenuInterface

morph

public void morph()
Specified by:
morph in interface GUIMenuInterface

morph

public void morph(java.lang.String name,
                  java.lang.String newType)
Specified by:
morph in interface GUIMenuInterface

moveOrigin

public void moveOrigin(int direction)
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:12:21)

Specified by:
moveOrigin in interface GUIMenuInterface

newCmd

public void newCmd()
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:04:49)

Specified by:
newCmd in interface GUIMenuInterface

openDB

public void openDB(java.io.File file)
            throws java.io.IOException
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:10:15)

Specified by:
openDB in interface GUIMenuInterface
Parameters:
file - java.io.File
Throws:
java.io.IOException - The exception description.

openDBD

public void openDBD(java.io.File file)
             throws java.io.IOException
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:10:50)

Specified by:
openDBD in interface GUIMenuInterface
Parameters:
file - java.io.File
Throws:
java.io.IOException - The exception description.

paste

public void paste()
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:07:54)

Specified by:
paste in interface GUIMenuInterface

pasteAtPosition

public void pasteAtPosition(int pX,
                            int pY)
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:07:54)

Specified by:
pasteAtPosition in interface GUIMenuInterface

print

public void print()
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:07:19)

Specified by:
print in interface GUIMenuInterface

redo

public void redo()
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:07:33)

Specified by:
redo in interface GUIMenuInterface

rename

public void rename()
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:08:06)

Specified by:
rename in interface GUIMenuInterface

rename

public void rename(java.lang.String oldName,
                   java.lang.String newName)
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:08:06)

Specified by:
rename in interface GUIMenuInterface

save

public void save(java.io.File file)
          throws java.io.IOException
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:48:15)

Specified by:
save in interface GUIMenuInterface
Parameters:
file - java.io.File
Throws:
java.io.IOException - The exception description.

saveAsGroup

public void saveAsGroup(java.io.File file)
                 throws java.io.IOException
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:11:04)

Specified by:
saveAsGroup in interface GUIMenuInterface
Parameters:
file - java.io.File
Throws:
java.io.IOException - The exception description.

saveRdbGroup

public void saveRdbGroup(javax.swing.JFrame guiContext,
                         boolean dialog)
Specified by:
saveRdbGroup in interface GUIMenuInterface

saveAsTemplate

public void saveAsTemplate(java.io.File file)
                    throws java.io.IOException
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:11:04)

Specified by:
saveAsTemplate in interface GUIMenuInterface
Parameters:
file - java.io.File
Throws:
java.io.IOException - The exception description.

selectAll

public void selectAll()
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:08:39)

Specified by:
selectAll in interface GUIMenuInterface

setFlatView

public void setFlatView(boolean state)
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:11:32)

Specified by:
setFlatView in interface GUIMenuInterface
Parameters:
state - boolean

setScale

public void setScale(double scale)
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:48:02)

Specified by:
setScale in interface GUIMenuInterface
Parameters:
scale - double

showGrid

public void showGrid(boolean state)
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:13:01)

Specified by:
showGrid in interface GUIMenuInterface
Parameters:
state - boolean

showNavigator

public void showNavigator(boolean state)
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (27.4.2001 19:54:15)

Specified by:
showNavigator in interface GUIMenuInterface
Parameters:
state - boolean

smartZoom

public void smartZoom()
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:57:42)

Specified by:
smartZoom in interface GUIMenuInterface

snapToGrid

public void snapToGrid(boolean state)
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:13:22)

Specified by:
snapToGrid in interface GUIMenuInterface
Parameters:
state - boolean

systemCopy

public void systemCopy()
Specified by:
systemCopy in interface GUIMenuInterface
See Also:
DSGUIInterface.systemCopy()

systemPaste

public void systemPaste()
Specified by:
systemPaste in interface GUIMenuInterface
See Also:
DSGUIInterface.systemPaste()

undo

public void undo()
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:07:26)

Specified by:
undo in interface GUIMenuInterface
See Also:
DSGUIInterface.undo()

ungroup

public void ungroup()
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:08:21)

Specified by:
ungroup in interface GUIMenuInterface
See Also:
DSGUIInterface.ungroup()

updateGroupLabel

public void updateGroupLabel()
Description copied from interface: GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:08:21)

Specified by:
updateGroupLabel in interface GUIMenuInterface
See Also:
DSGUIInterface.updateGroupLabel()

repaint

public void repaint(boolean highlighted)
Specified by:
repaint in interface RepaintInterface

repaintAll

public void repaintAll(boolean highlighted)
Specified by:
repaintAll in interface RepaintInterface

reset

public void reset()
Specified by:
reset in interface GUIMenuInterface

getNumberOfPages

public int getNumberOfPages()
Specified by:
getNumberOfPages in interface java.awt.print.Pageable

getPageFormat

public java.awt.print.PageFormat getPageFormat(int pageIndex)
                                        throws java.lang.IndexOutOfBoundsException
Specified by:
getPageFormat in interface java.awt.print.Pageable
Throws:
java.lang.IndexOutOfBoundsException

getPrintable

public java.awt.print.Printable getPrintable(int pageIndex)
                                      throws java.lang.IndexOutOfBoundsException
Specified by:
getPrintable in interface java.awt.print.Pageable
Throws:
java.lang.IndexOutOfBoundsException

close

public void close()
Specified by:
close in interface GUIMenuInterface

closeAll

public void closeAll()
Specified by:
closeAll in interface GUIMenuInterface