Package com.cosylab.vdct.graphics
Class DsManager
- java.lang.Object
-
- com.cosylab.vdct.graphics.DsManager
-
- All Implemented Interfaces:
DsManagerInterface
,GUIMenuInterface
,LinkCommandInterface
,RepaintInterface
,VDBInterface
,Pageable
public class DsManager extends Object implements DsManagerInterface, GUIMenuInterface, VDBInterface, LinkCommandInterface, RepaintInterface, Pageable
- Author:
- ssah
-
-
Field Summary
Fields Modifier and Type Field Description protected CopyContext
copyContext
protected DesktopInterface
desktopInterface
protected static HashMap
drawingSurfaces
protected int
dsCount
protected Vector
dsEventListeners
protected DSGUIInterface
dsInterface
protected static DsManager
instance
-
Fields inherited from interface java.awt.print.Pageable
UNKNOWN_NUMBER_OF_PAGES
-
-
Constructor Summary
Constructors Constructor Description DsManager(DesktopInterface desktopInterface)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description VisualComponent
addDrawingSurface(Object id, InternalFrameInterface displayer)
void
addDsEventListener(DsEventListener listener)
void
baseView()
Insert the method's description here.String
checkGroupName(String name, boolean relative)
Returns error message or null if OK Creation date: (3.2.2001 22:11:01)String
checkRecordName(String name, String oldName, boolean relative)
Returns error message or null if OK.void
close()
void
closeAll()
void
closeDrawingSurface(Object id)
void
copy()
Insert the method's description here.Box
createBox()
Insert the method's description here.void
createDummyDrawingSurface()
Line
createLine()
void
createRecord(String name, String type, boolean relative)
TextBox
createTextBox()
void
cut()
Insert the method's description here.void
delete()
Insert the method's description here.void
export(File file)
Insert the method's description here.void
exportAsGroup(File file)
Insert the method's description here.static Vector
getAllDrawingSurfaces()
static DrawingSurface
getDrawingSurface()
static DrawingSurface
getDrawingSurface(Object id)
DrawingSurfaceInterface
getDrawingSurfaceById(Object id)
DrawingSurfaceInterface[]
getDrawingSurfaces()
DrawingSurfaceInterface
getFocusedDrawingSurface()
int
getNumberOfPages()
PageFormat
getPageFormat(int pageIndex)
Printable
getPrintable(int pageIndex)
void
group(String groupName)
Insert the method's description here.void
importBorder(File file)
Insert the method's description here.void
importDB(File file)
Insert the method's description here.void
importDBD(File file)
Insert the method's description here.void
importFields(File file)
Insert the method's description here.void
importTemplateDB(File file)
Insert the method's description here.boolean
isErrorMessage(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(JFrame guiContext)
void
morph()
void
morph(String name, String newType)
void
moveOrigin(int direction)
Insert the method's description here.void
newCmd()
Insert the method's description here.void
openDB(File file)
Insert the method's description here.void
openDBD(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(Object id)
void
removeDsEventListener(DsEventListener listener)
void
rename()
Insert the method's description here.void
rename(String oldName, String newName)
Insert the method's description here.void
repaint(boolean highlighted)
void
repaintAll(boolean highlighted)
void
reset()
void
save(File file)
Insert the method's description here.void
saveAsGroup(File file)
Insert the method's description here.void
saveAsTemplate(File file)
Insert the method's description here.void
saveRdbGroup(JFrame guiContext, boolean dialog)
void
selectAll()
Insert the method's description here.void
setFlatView(boolean state)
Insert the method's description here.void
setFocusedDrawingSurface(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.
-
-
-
Field Detail
-
instance
protected static DsManager instance
-
dsInterface
protected DSGUIInterface dsInterface
-
drawingSurfaces
protected static HashMap drawingSurfaces
-
desktopInterface
protected DesktopInterface desktopInterface
-
copyContext
protected CopyContext copyContext
-
dsEventListeners
protected Vector dsEventListeners
-
dsCount
protected int dsCount
-
-
Constructor Detail
-
DsManager
public DsManager(DesktopInterface desktopInterface)
- Parameters:
desktopInterface
- desktopInterface
-
-
Method Detail
-
getDrawingSurface
public static DrawingSurface getDrawingSurface()
- Returns:
- something
-
getDrawingSurface
public static DrawingSurface getDrawingSurface(Object id)
- Parameters:
id
- id- Returns:
- something
-
getAllDrawingSurfaces
public static Vector getAllDrawingSurfaces()
- Returns:
- something
-
createDummyDrawingSurface
public void createDummyDrawingSurface()
-
addDrawingSurface
public VisualComponent addDrawingSurface(Object id, InternalFrameInterface displayer)
- Specified by:
addDrawingSurface
in interfaceDsManagerInterface
- Parameters:
id
- iddisplayer
- displayer- Returns:
- something
-
getDrawingSurfaceById
public DrawingSurfaceInterface getDrawingSurfaceById(Object id)
- Specified by:
getDrawingSurfaceById
in interfaceDsManagerInterface
- Parameters:
id
- id- Returns:
- something
-
removeDrawingSurface
public void removeDrawingSurface(Object id)
- Specified by:
removeDrawingSurface
in interfaceDsManagerInterface
- Parameters:
id
- id
-
getFocusedDrawingSurface
public DrawingSurfaceInterface getFocusedDrawingSurface()
- Specified by:
getFocusedDrawingSurface
in interfaceDsManagerInterface
- Returns:
- something
-
setFocusedDrawingSurface
public void setFocusedDrawingSurface(Object id)
- Specified by:
setFocusedDrawingSurface
in interfaceDsManagerInterface
- Parameters:
id
- id
-
getDrawingSurfaces
public DrawingSurfaceInterface[] getDrawingSurfaces()
- Specified by:
getDrawingSurfaces
in interfaceDsManagerInterface
- Returns:
- something
-
closeDrawingSurface
public void closeDrawingSurface(Object id)
- Specified by:
closeDrawingSurface
in interfaceDsManagerInterface
- Parameters:
id
- id
-
addDsEventListener
public void addDsEventListener(DsEventListener listener)
- Specified by:
addDsEventListener
in interfaceDsManagerInterface
- Parameters:
listener
- listener
-
removeDsEventListener
public void removeDsEventListener(DsEventListener listener)
- Specified by:
removeDsEventListener
in interfaceDsManagerInterface
- Parameters:
listener
- listener
-
linkCommand
public void linkCommand(VisibleObject linkObject, LinkSource linkData)
- Specified by:
linkCommand
in interfaceLinkCommandInterface
- Parameters:
linkObject
- linkObjectlinkData
- linkData
-
checkGroupName
public String checkGroupName(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 interfaceVDBInterface
- Parameters:
name
- java.lang.Stringrelative
- relative- Returns:
- java.lang.String
-
checkRecordName
public String checkRecordName(String name, 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 interfaceVDBInterface
- Parameters:
name
- java.lang.StringoldName
- oldNamerelative
- relative- 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 interfaceVDBInterface
- Returns:
- something
-
createLine
public Line createLine()
- Specified by:
createLine
in interfaceVDBInterface
- Returns:
- something
-
createRecord
public void createRecord(String name, String type, boolean relative)
- Specified by:
createRecord
in interfaceVDBInterface
- Parameters:
name
- nametype
- typerelative
- relative
-
createTextBox
public TextBox createTextBox()
- Specified by:
createTextBox
in interfaceVDBInterface
- Returns:
- something
-
isErrorMessage
public boolean isErrorMessage(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 interfaceVDBInterface
- Parameters:
message
- message- Returns:
- something
-
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 interfaceGUIMenuInterface
-
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 interfaceGUIMenuInterface
-
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 interfaceGUIMenuInterface
-
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 interfaceGUIMenuInterface
-
export
public void export(File file) throws IOException
Description copied from interface:GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:48:15)- Specified by:
export
in interfaceGUIMenuInterface
- Parameters:
file
- java.io.File- Throws:
IOException
- The exception description.
-
exportAsGroup
public void exportAsGroup(File file) throws IOException
Description copied from interface:GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:11:04)- Specified by:
exportAsGroup
in interfaceGUIMenuInterface
- Parameters:
file
- java.io.File- Throws:
IOException
- The exception description.
-
group
public void group(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 interfaceGUIMenuInterface
- Parameters:
groupName
- groupName
-
importBorder
public void importBorder(File file) throws IOException
Description copied from interface:GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:10:27)- Specified by:
importBorder
in interfaceGUIMenuInterface
- Parameters:
file
- java.io.File- Throws:
IOException
- The exception description.
-
importDB
public void importDB(File file) throws IOException
Description copied from interface:GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:10:27)- Specified by:
importDB
in interfaceGUIMenuInterface
- Parameters:
file
- java.io.File- Throws:
IOException
- The exception description.
-
importDBD
public void importDBD(File file) throws IOException
Description copied from interface:GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:10:38)- Specified by:
importDBD
in interfaceGUIMenuInterface
- Parameters:
file
- java.io.File- Throws:
IOException
- The exception description.
-
importFields
public void importFields(File file) throws IOException
Description copied from interface:GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:10:27)- Specified by:
importFields
in interfaceGUIMenuInterface
- Parameters:
file
- java.io.File- Throws:
IOException
- The exception description.
-
importTemplateDB
public void importTemplateDB(File file) throws IOException
Description copied from interface:GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:10:27)- Specified by:
importTemplateDB
in interfaceGUIMenuInterface
- Parameters:
file
- java.io.File- Throws:
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 interfaceGUIMenuInterface
- Returns:
- boolean
-
isMacroPortsIDChanged
public boolean isMacroPortsIDChanged()
- Specified by:
isMacroPortsIDChanged
in interfaceGUIMenuInterface
- Returns:
- something
-
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 interfaceGUIMenuInterface
-
loadRdbGroup
public void loadRdbGroup(JFrame guiContext)
- Specified by:
loadRdbGroup
in interfaceGUIMenuInterface
- Parameters:
guiContext
- guiContext
-
morph
public void morph()
- Specified by:
morph
in interfaceGUIMenuInterface
-
morph
public void morph(String name, String newType)
- Specified by:
morph
in interfaceGUIMenuInterface
- Parameters:
name
- namenewType
- newType
-
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 interfaceGUIMenuInterface
- Parameters:
direction
- direction
-
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 interfaceGUIMenuInterface
-
openDB
public void openDB(File file) throws IOException
Description copied from interface:GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:10:15)- Specified by:
openDB
in interfaceGUIMenuInterface
- Parameters:
file
- java.io.File- Throws:
IOException
- The exception description.
-
openDBD
public void openDBD(File file) throws IOException
Description copied from interface:GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:10:50)- Specified by:
openDBD
in interfaceGUIMenuInterface
- Parameters:
file
- java.io.File- Throws:
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 interfaceGUIMenuInterface
-
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 interfaceGUIMenuInterface
- Parameters:
pX
- pXpY
- pY
-
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 interfaceGUIMenuInterface
-
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 interfaceGUIMenuInterface
-
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 interfaceGUIMenuInterface
-
rename
public void rename(String oldName, 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 interfaceGUIMenuInterface
- Parameters:
oldName
- oldNamenewName
- newName
-
save
public void save(File file) throws IOException
Description copied from interface:GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:48:15)- Specified by:
save
in interfaceGUIMenuInterface
- Parameters:
file
- java.io.File- Throws:
IOException
- The exception description.
-
saveAsGroup
public void saveAsGroup(File file) throws IOException
Description copied from interface:GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:11:04)- Specified by:
saveAsGroup
in interfaceGUIMenuInterface
- Parameters:
file
- java.io.File- Throws:
IOException
- The exception description.
-
saveRdbGroup
public void saveRdbGroup(JFrame guiContext, boolean dialog)
- Specified by:
saveRdbGroup
in interfaceGUIMenuInterface
- Parameters:
guiContext
- guiContextdialog
- dialog
-
saveAsTemplate
public void saveAsTemplate(File file) throws IOException
Description copied from interface:GUIMenuInterface
Insert the method's description here. Creation date: (4.2.2001 15:11:04)- Specified by:
saveAsTemplate
in interfaceGUIMenuInterface
- Parameters:
file
- java.io.File- Throws:
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 interfaceGUIMenuInterface
-
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 interfaceGUIMenuInterface
- 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 interfaceGUIMenuInterface
- 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 interfaceGUIMenuInterface
- 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 interfaceGUIMenuInterface
- 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 interfaceGUIMenuInterface
-
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 interfaceGUIMenuInterface
- Parameters:
state
- boolean
-
systemCopy
public void systemCopy()
- Specified by:
systemCopy
in interfaceGUIMenuInterface
- See Also:
DSGUIInterface.systemCopy()
-
systemPaste
public void systemPaste()
- Specified by:
systemPaste
in interfaceGUIMenuInterface
- 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 interfaceGUIMenuInterface
- 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 interfaceGUIMenuInterface
- 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 interfaceGUIMenuInterface
- See Also:
DSGUIInterface.updateGroupLabel()
-
repaint
public void repaint(boolean highlighted)
- Specified by:
repaint
in interfaceRepaintInterface
- Parameters:
highlighted
- highlighted
-
repaintAll
public void repaintAll(boolean highlighted)
- Specified by:
repaintAll
in interfaceRepaintInterface
- Parameters:
highlighted
- highlighted
-
reset
public void reset()
- Specified by:
reset
in interfaceGUIMenuInterface
-
getNumberOfPages
public int getNumberOfPages()
- Specified by:
getNumberOfPages
in interfacePageable
-
getPageFormat
public PageFormat getPageFormat(int pageIndex) throws IndexOutOfBoundsException
- Specified by:
getPageFormat
in interfacePageable
- Throws:
IndexOutOfBoundsException
-
getPrintable
public Printable getPrintable(int pageIndex) throws IndexOutOfBoundsException
- Specified by:
getPrintable
in interfacePageable
- Throws:
IndexOutOfBoundsException
-
close
public void close()
- Specified by:
close
in interfaceGUIMenuInterface
-
closeAll
public void closeAll()
- Specified by:
closeAll
in interfaceGUIMenuInterface
-
-