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 CopyContextcopyContextprotected DesktopInterfacedesktopInterfaceprotected static HashMapdrawingSurfacesprotected intdsCountprotected VectordsEventListenersprotected DSGUIInterfacedsInterfaceprotected static DsManagerinstance-
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 VisualComponentaddDrawingSurface(Object id, InternalFrameInterface displayer)voidaddDsEventListener(DsEventListener listener)voidbaseView()Insert the method's description here.StringcheckGroupName(String name, boolean relative)Returns error message or null if OK Creation date: (3.2.2001 22:11:01)StringcheckRecordName(String name, String oldName, boolean relative)Returns error message or null if OK. oldName can be null if not applicable.voidclose()voidcloseAll()voidcloseDrawingSurface(Object id)voidcopy()Insert the method's description here.BoxcreateBox()Insert the method's description here.voidcreateDummyDrawingSurface()LinecreateLine()voidcreateRecord(String name, String type, boolean relative)TextBoxcreateTextBox()voidcut()Insert the method's description here.voiddelete()Insert the method's description here.voidexport(File file)Insert the method's description here.voidexportAsGroup(File file)Insert the method's description here.static VectorgetAllDrawingSurfaces()static DrawingSurfacegetDrawingSurface()static DrawingSurfacegetDrawingSurface(Object id)DrawingSurfaceInterfacegetDrawingSurfaceById(Object id)DrawingSurfaceInterface[]getDrawingSurfaces()DrawingSurfaceInterfacegetFocusedDrawingSurface()intgetNumberOfPages()PageFormatgetPageFormat(int pageIndex)PrintablegetPrintable(int pageIndex)voidgroup(String groupName)Insert the method's description here.voidimportBorder(File file)Insert the method's description here.voidimportDB(File file)Insert the method's description here.voidimportDBD(File file)Insert the method's description here.voidimportFields(File file)Insert the method's description here.voidimportTemplateDB(File file)Insert the method's description here.booleanisErrorMessage(String message)Returns true if the string returned by checkGroupName(...) and checkRecordName(...) is an error message and false when it is a warning.booleanisMacroPortsIDChanged()booleanisModified()Insert the method's description here.voidlevelUp()Insert the method's description here.voidlinkCommand(VisibleObject linkObject, LinkSource linkData)voidloadRdbGroup(JFrame guiContext)voidmorph()voidmorph(String name, String newType)voidmoveOrigin(int direction)Insert the method's description here.voidnewCmd()Insert the method's description here.voidopenDB(File file)Insert the method's description here.voidopenDBD(File file)Insert the method's description here.voidpaste()Insert the method's description here.voidpasteAtPosition(int pX, int pY)Insert the method's description here.voidprint()Insert the method's description here.voidredo()Insert the method's description here.voidremoveDrawingSurface(Object id)voidremoveDsEventListener(DsEventListener listener)voidrename()Insert the method's description here.voidrename(String oldName, String newName)Insert the method's description here.voidrepaint(boolean highlighted)voidrepaintAll(boolean highlighted)voidreset()voidsave(File file)Insert the method's description here.voidsaveAsGroup(File file)Insert the method's description here.voidsaveAsTemplate(File file)Insert the method's description here.voidsaveRdbGroup(JFrame guiContext, boolean dialog)voidselectAll()Insert the method's description here.voidsetFlatView(boolean state)Insert the method's description here.voidsetFocusedDrawingSurface(Object id)voidsetScale(double scale)Insert the method's description here.voidshowGrid(boolean state)Insert the method's description here.voidshowNavigator(boolean state)Insert the method's description here.voidsmartZoom()Insert the method's description here.voidsnapToGrid(boolean state)Insert the method's description here.voidsystemCopy()voidsystemPaste()voidundo()Insert the method's description here.voidungroup()Insert the method's description here.voidupdateGroupLabel()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:
addDrawingSurfacein interfaceDsManagerInterface- Parameters:
id- iddisplayer- displayer- Returns:
- something
-
getDrawingSurfaceById
public DrawingSurfaceInterface getDrawingSurfaceById(Object id)
- Specified by:
getDrawingSurfaceByIdin interfaceDsManagerInterface- Parameters:
id- id- Returns:
- something
-
removeDrawingSurface
public void removeDrawingSurface(Object id)
- Specified by:
removeDrawingSurfacein interfaceDsManagerInterface- Parameters:
id- id
-
getFocusedDrawingSurface
public DrawingSurfaceInterface getFocusedDrawingSurface()
- Specified by:
getFocusedDrawingSurfacein interfaceDsManagerInterface- Returns:
- something
-
setFocusedDrawingSurface
public void setFocusedDrawingSurface(Object id)
- Specified by:
setFocusedDrawingSurfacein interfaceDsManagerInterface- Parameters:
id- id
-
getDrawingSurfaces
public DrawingSurfaceInterface[] getDrawingSurfaces()
- Specified by:
getDrawingSurfacesin interfaceDsManagerInterface- Returns:
- something
-
closeDrawingSurface
public void closeDrawingSurface(Object id)
- Specified by:
closeDrawingSurfacein interfaceDsManagerInterface- Parameters:
id- id
-
addDsEventListener
public void addDsEventListener(DsEventListener listener)
- Specified by:
addDsEventListenerin interfaceDsManagerInterface- Parameters:
listener- listener
-
removeDsEventListener
public void removeDsEventListener(DsEventListener listener)
- Specified by:
removeDsEventListenerin interfaceDsManagerInterface- Parameters:
listener- listener
-
linkCommand
public void linkCommand(VisibleObject linkObject, LinkSource linkData)
- Specified by:
linkCommandin interfaceLinkCommandInterface- Parameters:
linkObject- linkObjectlinkData- linkData
-
checkGroupName
public String checkGroupName(String name, boolean relative)
Description copied from interface:VDBInterfaceReturns error message or null if OK Creation date: (3.2.2001 22:11:01)- Specified by:
checkGroupNamein 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:VDBInterfaceReturns error message or null if OK. oldName can be null if not applicable. Creation date: (3.2.2001 22:11:01)- Specified by:
checkRecordNamein interfaceVDBInterface- Parameters:
name- java.lang.StringoldName- oldNamerelative- relative- Returns:
- java.lang.String
-
createBox
public Box createBox()
Description copied from interface:VDBInterfaceInsert the method's description here. Creation date: (3.2.2001 23:27:30)- Specified by:
createBoxin interfaceVDBInterface- Returns:
- something
-
createLine
public Line createLine()
- Specified by:
createLinein interfaceVDBInterface- Returns:
- something
-
createRecord
public void createRecord(String name, String type, boolean relative)
- Specified by:
createRecordin interfaceVDBInterface- Parameters:
name- nametype- typerelative- relative
-
createTextBox
public TextBox createTextBox()
- Specified by:
createTextBoxin interfaceVDBInterface- Returns:
- something
-
isErrorMessage
public boolean isErrorMessage(String message)
Description copied from interface:VDBInterfaceReturns true if the string returned by checkGroupName(...) and checkRecordName(...) is an error message and false when it is a warning.- Specified by:
isErrorMessagein interfaceVDBInterface- Parameters:
message- message- Returns:
- something
-
baseView
public void baseView()
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:12:21)- Specified by:
baseViewin interfaceGUIMenuInterface
-
copy
public void copy()
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:07:46)- Specified by:
copyin interfaceGUIMenuInterface
-
cut
public void cut()
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:07:40)- Specified by:
cutin interfaceGUIMenuInterface
-
delete
public void delete()
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:08:30)- Specified by:
deletein interfaceGUIMenuInterface
-
export
public void export(File file) throws IOException
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:48:15)- Specified by:
exportin interfaceGUIMenuInterface- Parameters:
file- java.io.File- Throws:
IOException- The exception description.
-
exportAsGroup
public void exportAsGroup(File file) throws IOException
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:11:04)- Specified by:
exportAsGroupin interfaceGUIMenuInterface- Parameters:
file- java.io.File- Throws:
IOException- The exception description.
-
group
public void group(String groupName)
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:08:14)- Specified by:
groupin interfaceGUIMenuInterface- Parameters:
groupName- groupName
-
importBorder
public void importBorder(File file) throws IOException
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:10:27)- Specified by:
importBorderin interfaceGUIMenuInterface- Parameters:
file- java.io.File- Throws:
IOException- The exception description.
-
importDB
public void importDB(File file) throws IOException
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:10:27)- Specified by:
importDBin interfaceGUIMenuInterface- Parameters:
file- java.io.File- Throws:
IOException- The exception description.
-
importDBD
public void importDBD(File file) throws IOException
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:10:38)- Specified by:
importDBDin interfaceGUIMenuInterface- Parameters:
file- java.io.File- Throws:
IOException- The exception description.
-
importFields
public void importFields(File file) throws IOException
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:10:27)- Specified by:
importFieldsin interfaceGUIMenuInterface- Parameters:
file- java.io.File- Throws:
IOException- The exception description.
-
importTemplateDB
public void importTemplateDB(File file) throws IOException
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:10:27)- Specified by:
importTemplateDBin interfaceGUIMenuInterface- Parameters:
file- java.io.File- Throws:
IOException- The exception description.
-
isModified
public boolean isModified()
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (29.4.2001 11:37:15)- Specified by:
isModifiedin interfaceGUIMenuInterface- Returns:
- boolean
-
isMacroPortsIDChanged
public boolean isMacroPortsIDChanged()
- Specified by:
isMacroPortsIDChangedin interfaceGUIMenuInterface- Returns:
- something
-
levelUp
public void levelUp()
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:11:41)- Specified by:
levelUpin interfaceGUIMenuInterface
-
loadRdbGroup
public void loadRdbGroup(JFrame guiContext)
- Specified by:
loadRdbGroupin interfaceGUIMenuInterface- Parameters:
guiContext- guiContext
-
morph
public void morph()
- Specified by:
morphin interfaceGUIMenuInterface
-
morph
public void morph(String name, String newType)
- Specified by:
morphin interfaceGUIMenuInterface- Parameters:
name- namenewType- newType
-
moveOrigin
public void moveOrigin(int direction)
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:12:21)- Specified by:
moveOriginin interfaceGUIMenuInterface- Parameters:
direction- direction
-
newCmd
public void newCmd()
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:04:49)- Specified by:
newCmdin interfaceGUIMenuInterface
-
openDB
public void openDB(File file) throws IOException
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:10:15)- Specified by:
openDBin interfaceGUIMenuInterface- Parameters:
file- java.io.File- Throws:
IOException- The exception description.
-
openDBD
public void openDBD(File file) throws IOException
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:10:50)- Specified by:
openDBDin interfaceGUIMenuInterface- Parameters:
file- java.io.File- Throws:
IOException- The exception description.
-
paste
public void paste()
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:07:54)- Specified by:
pastein interfaceGUIMenuInterface
-
pasteAtPosition
public void pasteAtPosition(int pX, int pY)Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:07:54)- Specified by:
pasteAtPositionin interfaceGUIMenuInterface- Parameters:
pX- pXpY- pY
-
print
public void print()
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:07:19)- Specified by:
printin interfaceGUIMenuInterface
-
redo
public void redo()
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:07:33)- Specified by:
redoin interfaceGUIMenuInterface
-
rename
public void rename()
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:08:06)- Specified by:
renamein interfaceGUIMenuInterface
-
rename
public void rename(String oldName, String newName)
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:08:06)- Specified by:
renamein interfaceGUIMenuInterface- Parameters:
oldName- oldNamenewName- newName
-
save
public void save(File file) throws IOException
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:48:15)- Specified by:
savein interfaceGUIMenuInterface- Parameters:
file- java.io.File- Throws:
IOException- The exception description.
-
saveAsGroup
public void saveAsGroup(File file) throws IOException
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:11:04)- Specified by:
saveAsGroupin interfaceGUIMenuInterface- Parameters:
file- java.io.File- Throws:
IOException- The exception description.
-
saveRdbGroup
public void saveRdbGroup(JFrame guiContext, boolean dialog)
- Specified by:
saveRdbGroupin interfaceGUIMenuInterface- Parameters:
guiContext- guiContextdialog- dialog
-
saveAsTemplate
public void saveAsTemplate(File file) throws IOException
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:11:04)- Specified by:
saveAsTemplatein interfaceGUIMenuInterface- Parameters:
file- java.io.File- Throws:
IOException- The exception description.
-
selectAll
public void selectAll()
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:08:39)- Specified by:
selectAllin interfaceGUIMenuInterface
-
setFlatView
public void setFlatView(boolean state)
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:11:32)- Specified by:
setFlatViewin interfaceGUIMenuInterface- Parameters:
state- boolean
-
setScale
public void setScale(double scale)
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:48:02)- Specified by:
setScalein interfaceGUIMenuInterface- Parameters:
scale- double
-
showGrid
public void showGrid(boolean state)
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:13:01)- Specified by:
showGridin interfaceGUIMenuInterface- Parameters:
state- boolean
-
showNavigator
public void showNavigator(boolean state)
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (27.4.2001 19:54:15)- Specified by:
showNavigatorin interfaceGUIMenuInterface- Parameters:
state- boolean
-
smartZoom
public void smartZoom()
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:57:42)- Specified by:
smartZoomin interfaceGUIMenuInterface
-
snapToGrid
public void snapToGrid(boolean state)
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:13:22)- Specified by:
snapToGridin interfaceGUIMenuInterface- Parameters:
state- boolean
-
systemCopy
public void systemCopy()
- Specified by:
systemCopyin interfaceGUIMenuInterface- See Also:
DSGUIInterface.systemCopy()
-
systemPaste
public void systemPaste()
- Specified by:
systemPastein interfaceGUIMenuInterface- See Also:
DSGUIInterface.systemPaste()
-
undo
public void undo()
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:07:26)- Specified by:
undoin interfaceGUIMenuInterface- See Also:
DSGUIInterface.undo()
-
ungroup
public void ungroup()
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:08:21)- Specified by:
ungroupin interfaceGUIMenuInterface- See Also:
DSGUIInterface.ungroup()
-
updateGroupLabel
public void updateGroupLabel()
Description copied from interface:GUIMenuInterfaceInsert the method's description here. Creation date: (4.2.2001 15:08:21)- Specified by:
updateGroupLabelin interfaceGUIMenuInterface- See Also:
DSGUIInterface.updateGroupLabel()
-
repaint
public void repaint(boolean highlighted)
- Specified by:
repaintin interfaceRepaintInterface- Parameters:
highlighted- highlighted
-
repaintAll
public void repaintAll(boolean highlighted)
- Specified by:
repaintAllin interfaceRepaintInterface- Parameters:
highlighted- highlighted
-
reset
public void reset()
- Specified by:
resetin interfaceGUIMenuInterface
-
getNumberOfPages
public int getNumberOfPages()
- Specified by:
getNumberOfPagesin interfacePageable
-
getPageFormat
public PageFormat getPageFormat(int pageIndex) throws IndexOutOfBoundsException
- Specified by:
getPageFormatin interfacePageable- Throws:
IndexOutOfBoundsException
-
getPrintable
public Printable getPrintable(int pageIndex) throws IndexOutOfBoundsException
- Specified by:
getPrintablein interfacePageable- Throws:
IndexOutOfBoundsException
-
close
public void close()
- Specified by:
closein interfaceGUIMenuInterface
-
closeAll
public void closeAll()
- Specified by:
closeAllin interfaceGUIMenuInterface
-
-