jv.rsrc
Class PsJavaView
- java.lang.Object
-
- jv.object.PsObject
-
- jv.rsrc.PsJavaView
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, PsUpdateIf
public final class PsJavaView extends PsObject
All JavaView resource information for configuration of the system.- See Also:
- Serialized Form
- Author:
- Konrad Polthier
- Version:
- 27.02.18, 4.40 revised (kp) New methods to access and set window dimensions.
10.03.14, 4.31 revised (kp) Additional attribute largeModel of display.
07.08.08, 4.30 revised (kp) No longer parses fonts from other operating systems.
04.10.06, 4.21 revised (kp) Now all methods static since class shall be instantiated only once.
04.10.06, 4.20 revised (kp) Support for validation added.
06.02.05, 4.10 revised (kp) New flags for auto computations and instance sharing.
15.02.04, 4.00 revised (kp) Full revision.
26.06.03, 3.00 revised (kp) License section moved into separate class PsLicense.
24.03.03, 2.10 revised (kp) Window sizes adjusted to previous settings in PvViewer.
18.03.03, 2.00 revised (kp) Implementation continued.
16.04.00, 1.20 revised (kp) Extended again from PsObject.
20.02.00, 1.10 revised (kp) Extended from PsXmlSrc instead of PsObject.
13.02.00, 1.00 created (kp)
-
-
Field Summary
Fields Modifier and Type Field and Description static intFILE_BUGBug repository directory.static intFILE_CODEBASECodebase directory type is the installation directory of JavaView.static intFILE_GEOMETRYName of recent geometry file or directory.static intFILE_IMAGEName of recent image file or directory.static intFILE_LICENSELicense directory type identifies location of a license file.static intFILE_LOADERSName of package such as devXY.loader where system searches for additional loader classes such as devXY.loader.PgAbcLoader.static intFILE_MENUNames of menu packages such as dev.geom, additional entries must be comma separated.static intFILE_MODELSDirectory for model collection.static intFILE_RESOURCEResource directory type identifies the location of user profile.static intFILE_VALIDATEValidation repository directory.static intFILE_WORKINGWorking directory type is used for import and export of files.static booleanm_bAutoElementNormalsDetermines if normal vectors are automatically computed during file import.static booleanm_bAutoIdentifyDetermines if automatic identification of vertices is enabled during file import.static booleanm_bAutoLoadDisplayDetermines if JavaView should search for display settings (e.g.static booleanm_bAutoNeighbourDetermines if neighbour information is automatically computed during file import.static booleanm_bAutoNormalsDetermines if normal vectors are automatically computed during file import.static booleanm_bCleanDisplayDetermines if display is cleaned when a new geometry file is loaded or dragged into the scene.static booleanm_bConsoleUsablestatic booleanm_bControlUsablestatic booleanm_bFastClippingDetermines if fast clipping is performed during rendering.static booleanm_bFilterElementColorsDetermines if element colors are filtered i.e. excluded during file import.static booleanm_bFilterElementNormalsDetermines if element normals are filtered i.e. excluded during file import.static booleanm_bFilterElementTextureDetermines if element texture coordinates are filtered i.e. excluded during file import.static booleanm_bFilterVertexColorsDetermines if vertex colors are filtered i.e. excluded during file import.static booleanm_bFilterVertexNormalsDetermines if vertex normals are filtered i.e. excluded during file import.static booleanm_bFilterVertexTextureDetermines if vertex texture coordinates are filtered i.e. excluded during file import.static booleanm_bFilterVerticesDetermines if vertices are filtered i.e. only every 100th vertex is loaded, requires m_bOnlyVertices==true.static booleanm_bInstanceSharingDetermines if a geometry and its PvGeometry display container may share instance variables.static booleanm_bLargeModelDetermines if optimizations for large models are performed in display.static booleanm_bOnlyVerticesDetermines if only vertices of a geometry are loaded.static java.lang.Stringm_consoleVisiblestatic java.lang.Stringm_controlVisiblestatic java.lang.Stringm_monitorMouseMonitor type determines the monitor mouse.static intm_monitorTypeDefault monitor type determines the monitor screen.static java.lang.Stringm_viewerScreenstatic java.lang.Stringm_viewerVisiblestatic intMONITORIdentifier of control window.static intMONITOR_QVGAMonitor size is 320*240.static intMONITOR_SVGAMonitor size is 800*600.static intMONITOR_SXGAMonitor size is 1280*1024.static intMONITOR_USERMonitor size is user-defined.static intMONITOR_UXGAMonitor size is 1600*1200.static intMONITOR_VGAMonitor size is 640*480.static intMONITOR_XGAMonitor size is 1024*768.static intWINDOW_ABOUTIdentifier of about window.static intWINDOW_ANIMATIONIdentifier of animation dialog.static intWINDOW_CONSOLEIdentifier of JavaView console.static intWINDOW_CONTROLIdentifier of control window.static intWINDOW_DISPLAYIdentifier of display window.static intWINDOW_EXPORT_MODELIdentifier of export window.static intWINDOW_HELPIdentifier of help window.static intWINDOW_IMPORT_MODELIdentifier of import window.static intWINDOW_NEW_PROJECTIdentifier of new project window.-
Fields inherited from class jv.object.PsObject
HAS_BOUNDARY_PANEL, HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_LABEL_PANEL, HAS_MATERIAL_PANEL, HAS_TEXTURE_PANEL, HAS_VECTOR_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_FOCUSSED, IS_PICKED, IS_SELECTED, IS_USED, NUM_TAGS
-
-
Constructor Summary
Constructors Constructor and Description PsJavaView()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static PsAuthorInfogetAuthorInfo()Get information about current user of JavaView.static java.lang.StringgetDirectory(int type)Get special directories of JavaView, for example, the PsJavaView#FILE_WORKING which is suggested when exporting geometries.static java.lang.StringgetFileName(int type)Get special fileName of JavaView, for example, the file type PsJavaView#FILE_RESOURCE identifies a resource file for user preferences.static java.lang.StringgetFullFileName(int type)Get special fileName and path of JavaView, for example, the file type PsJavaView#FILE_RESOURCE identifies a resource file for user preferences.static intgetMonitorType()Get the type of monitor, basically get an ID from which its size can be determined.java.lang.StringgetTitle()Get the title of the resource description.static int[]getWindowSize(int windowId)Get default position and size a window or dialog of the current active monitor type.static PsXmlSrcgetXml()Fills an XML tree with data from this instance, for example, to print to file.static booleanisEnabledWorkshopBackup()Determines if backup copies of geometries are created when a workshop is opened.static booleanread(java.lang.String rsrcFile)Read an XML file and create a tree structure of instances of typePsXmlNode.static voidsetAuthorInfo(PsAuthorInfo info)Set author information by copying or cloning the argument author info.static voidsetDirectory(int type, java.lang.String dir)Set special directories of JavaView, for example, the directory type PsJavaView#FILE_WORKING identifies a location which is suggested when exporting geometries.static voidsetEnabledWorkshopBackup(boolean flag)Determines if backup copies of geometries are created when a workshop is opened.static voidsetFileName(int type, java.lang.String fileName)Set special fileName of JavaView, for example, the file type PsJavaView#FILE_RESOURCE identifies a resource file for user preferences.static voidsetFullFileName(int type, java.lang.String fullFileName)Set special fileName and path of JavaView, for example, the file type PsJavaView#FILE_RESOURCE identifies a resource file for user preferences.static voidsetMonitorType(int type)Set the title of the resource description.voidsetTitle(java.lang.String title)Set the title of the resource description.static booleansetWindowSize(int windowId, int[] windowSize)Set default position and size a window or dialog of the current active monitor type.static voidsetXml(PsXmlSrc src)Fill this instance with data from an XML source, for example, previously read from file.static booleanwrite(java.lang.String rsrcFile)Write an XML file and create a tree structure of instances of typePsXmlNode.-
Methods inherited from class jv.object.PsObject
addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, getSymbol, hasInspector, hasTag, hasUpdateListener, init, instanceOf, instanceOf, newInspector, newInspector, removeInspector, removeInspector, removeUpdateListener, setName, setParent, setSymbol, setTag, toString, update, updatePanels
-
-
-
-
Field Detail
-
FILE_CODEBASE
public static final int FILE_CODEBASE
Codebase directory type is the installation directory of JavaView.- See Also:
- Constant Field Values
-
FILE_LICENSE
public static final int FILE_LICENSE
License directory type identifies location of a license file.- See Also:
- Constant Field Values
-
FILE_RESOURCE
public static final int FILE_RESOURCE
Resource directory type identifies the location of user profile.- See Also:
- Constant Field Values
-
FILE_WORKING
public static final int FILE_WORKING
Working directory type is used for import and export of files.- See Also:
- Constant Field Values
-
FILE_MODELS
public static final int FILE_MODELS
Directory for model collection.- See Also:
- Constant Field Values
-
FILE_BUG
public static final int FILE_BUG
Bug repository directory.- See Also:
- Constant Field Values
-
FILE_VALIDATE
public static final int FILE_VALIDATE
Validation repository directory.- See Also:
- Constant Field Values
-
FILE_GEOMETRY
public static final int FILE_GEOMETRY
Name of recent geometry file or directory.- See Also:
- Constant Field Values
-
FILE_IMAGE
public static final int FILE_IMAGE
Name of recent image file or directory.- See Also:
- Constant Field Values
-
FILE_LOADERS
public static final int FILE_LOADERS
Name of package such as devXY.loader where system searches for additional loader classes such as devXY.loader.PgAbcLoader. The loader PgAbcLoader is then used to load geometry files in the Abc format, such as myShape.abc with filename extension abc.- Since:
- JavaView 3.99.073
- See Also:
- Constant Field Values
-
FILE_MENU
public static final int FILE_MENU
Names of menu packages such as dev.geom, additional entries must be comma separated. JavaView then searches for menu classes such as dev.geom.[GeometryClass]_menu.class where GeometryClass the base name of the currently selected geometry class is.- See Also:
- Constant Field Values
-
MONITOR_UXGA
public static final int MONITOR_UXGA
Monitor size is 1600*1200.- See Also:
- Constant Field Values
-
MONITOR_SXGA
public static final int MONITOR_SXGA
Monitor size is 1280*1024.- See Also:
- Constant Field Values
-
MONITOR_XGA
public static final int MONITOR_XGA
Monitor size is 1024*768.- See Also:
- Constant Field Values
-
MONITOR_SVGA
public static final int MONITOR_SVGA
Monitor size is 800*600.- See Also:
- Constant Field Values
-
MONITOR_VGA
public static final int MONITOR_VGA
Monitor size is 640*480.- See Also:
- Constant Field Values
-
MONITOR_QVGA
public static final int MONITOR_QVGA
Monitor size is 320*240.- See Also:
- Constant Field Values
-
MONITOR_USER
public static final int MONITOR_USER
Monitor size is user-defined.- See Also:
- Constant Field Values
-
MONITOR
public static final int MONITOR
Identifier of control window.- See Also:
- Constant Field Values
-
WINDOW_DISPLAY
public static final int WINDOW_DISPLAY
Identifier of display window.- See Also:
- Constant Field Values
-
WINDOW_CONTROL
public static final int WINDOW_CONTROL
Identifier of control window.- See Also:
- Constant Field Values
-
WINDOW_ABOUT
public static final int WINDOW_ABOUT
Identifier of about window.- See Also:
- Constant Field Values
-
WINDOW_HELP
public static final int WINDOW_HELP
Identifier of help window.- See Also:
- Constant Field Values
-
WINDOW_CONSOLE
public static final int WINDOW_CONSOLE
Identifier of JavaView console.- See Also:
- Constant Field Values
-
WINDOW_ANIMATION
public static final int WINDOW_ANIMATION
Identifier of animation dialog.- See Also:
- Constant Field Values
-
WINDOW_NEW_PROJECT
public static final int WINDOW_NEW_PROJECT
Identifier of new project window.- See Also:
- Constant Field Values
-
WINDOW_IMPORT_MODEL
public static final int WINDOW_IMPORT_MODEL
Identifier of import window.- See Also:
- Constant Field Values
-
WINDOW_EXPORT_MODEL
public static final int WINDOW_EXPORT_MODEL
Identifier of export window.- See Also:
- Constant Field Values
-
m_bAutoIdentify
public static boolean m_bAutoIdentify
Determines if automatic identification of vertices is enabled during file import.
-
m_bAutoNeighbour
public static boolean m_bAutoNeighbour
Determines if neighbour information is automatically computed during file import.
-
m_bAutoNormals
public static boolean m_bAutoNormals
Determines if normal vectors are automatically computed during file import.
-
m_bAutoElementNormals
public static boolean m_bAutoElementNormals
Determines if normal vectors are automatically computed during file import.
-
m_bFastClipping
public static boolean m_bFastClipping
Determines if fast clipping is performed during rendering.
-
m_bInstanceSharing
public static boolean m_bInstanceSharing
Determines if a geometry and its PvGeometry display container may share instance variables.
-
m_bLargeModel
public static boolean m_bLargeModel
Determines if optimizations for large models are performed in display.
-
m_bOnlyVertices
public static boolean m_bOnlyVertices
Determines if only vertices of a geometry are loaded.
-
m_bFilterVertices
public static boolean m_bFilterVertices
Determines if vertices are filtered i.e. only every 100th vertex is loaded, requires m_bOnlyVertices==true.
-
m_bFilterVertexColors
public static boolean m_bFilterVertexColors
Determines if vertex colors are filtered i.e. excluded during file import.
-
m_bFilterVertexNormals
public static boolean m_bFilterVertexNormals
Determines if vertex normals are filtered i.e. excluded during file import.
-
m_bFilterVertexTexture
public static boolean m_bFilterVertexTexture
Determines if vertex texture coordinates are filtered i.e. excluded during file import.
-
m_bFilterElementColors
public static boolean m_bFilterElementColors
Determines if element colors are filtered i.e. excluded during file import.
-
m_bFilterElementNormals
public static boolean m_bFilterElementNormals
Determines if element normals are filtered i.e. excluded during file import.
-
m_bFilterElementTexture
public static boolean m_bFilterElementTexture
Determines if element texture coordinates are filtered i.e. excluded during file import.
-
m_monitorType
public static int m_monitorType
Default monitor type determines the monitor screen.
-
m_monitorMouse
public static java.lang.String m_monitorMouse
Monitor type determines the monitor mouse.
-
m_viewerScreen
public static java.lang.String m_viewerScreen
-
m_viewerVisible
public static java.lang.String m_viewerVisible
-
m_controlVisible
public static java.lang.String m_controlVisible
-
m_bControlUsable
public static boolean m_bControlUsable
-
m_consoleVisible
public static java.lang.String m_consoleVisible
-
m_bConsoleUsable
public static boolean m_bConsoleUsable
-
m_bCleanDisplay
public static boolean m_bCleanDisplay
Determines if display is cleaned when a new geometry file is loaded or dragged into the scene.
-
m_bAutoLoadDisplay
public static boolean m_bAutoLoadDisplay
Determines if JavaView should search for display settings (e.g. JVD file) when loading a geometry file.
-
-
Method Detail
-
isEnabledWorkshopBackup
public static boolean isEnabledWorkshopBackup()
Determines if backup copies of geometries are created when a workshop is opened.- Since:
- JavaView 3.09.003
- Version:
- 14.02.04, 1.00 created (kp)
-
setEnabledWorkshopBackup
public static void setEnabledWorkshopBackup(boolean flag)
Determines if backup copies of geometries are created when a workshop is opened. By default, backup copies of geometries are created when a workshop is opened. This provides an UNDO feature to restore the original geometry when a user cancels the workshop.- Since:
- JavaView 3.09.003
- Version:
- 14.02.04, 1.00 created (kp)
-
getTitle
public java.lang.String getTitle()
Get the title of the resource description.- See Also:
setTitle(String)
-
setTitle
public void setTitle(java.lang.String title)
Set the title of the resource description.- See Also:
getTitle()
-
getDirectory
public static java.lang.String getDirectory(int type)
Get special directories of JavaView, for example, the PsJavaView#FILE_WORKING which is suggested when exporting geometries. A user may specify different directory types in his JavaView resource file*.jvr.By default the working directory is the codeBase.
- Since:
- JavaView 2.89.000
- See Also:
setDirectory(int, String)- Version:
- 14.02.04, 2.00 revised (kp) Type parameter added.
28.07.03, 1.00 created (kp)
-
setDirectory
public static void setDirectory(int type, java.lang.String dir)Set special directories of JavaView, for example, the directory type PsJavaView#FILE_WORKING identifies a location which is suggested when exporting geometries. A user may specify different directory types in his JavaView resource file*.jvr.By default the working directory is the codeBase.
- Since:
- JavaView 2.89.000
- See Also:
getDirectory(int)- Version:
- 01.11.05, 2.50 revised (kp) Reuse current relative directory when working path changes.
14.02.04, 2.00 revised (kp) Type parameter added.
28.07.03, 1.00 created (kp)
-
getFileName
public static java.lang.String getFileName(int type)
Get special fileName of JavaView, for example, the file type PsJavaView#FILE_RESOURCE identifies a resource file for user preferences.- Since:
- JavaView 3.09.003
- See Also:
setFileName(int, String)- Version:
- 14.02.04, 1.00 created (kp)
-
setFileName
public static void setFileName(int type, java.lang.String fileName)Set special fileName of JavaView, for example, the file type PsJavaView#FILE_RESOURCE identifies a resource file for user preferences.- Since:
- JavaView 3.09.003
- See Also:
getFileName(int)- Version:
- 14.02.04, 1.00 created (kp)
-
getFullFileName
public static java.lang.String getFullFileName(int type)
Get special fileName and path of JavaView, for example, the file type PsJavaView#FILE_RESOURCE identifies a resource file for user preferences.- Since:
- JavaView 3.09.003
- See Also:
setFullFileName(int, String)- Version:
- 14.02.04, 1.00 created (kp)
-
setFullFileName
public static void setFullFileName(int type, java.lang.String fullFileName)Set special fileName and path of JavaView, for example, the file type PsJavaView#FILE_RESOURCE identifies a resource file for user preferences.- Since:
- JavaView 3.09.003
- See Also:
getFullFileName(int)- Version:
- 14.02.04, 1.00 created (kp)
-
getAuthorInfo
public static PsAuthorInfo getAuthorInfo()
Get information about current user of JavaView.
-
setAuthorInfo
public static void setAuthorInfo(PsAuthorInfo info)
Set author information by copying or cloning the argument author info. If argument is null then global author information is removed.
-
read
public static boolean read(java.lang.String rsrcFile)
Read an XML file and create a tree structure of instances of typePsXmlNode.- Parameters:
rsrcFile- full name of resource file- Returns:
trueif loading was successful
-
write
public static boolean write(java.lang.String rsrcFile)
Write an XML file and create a tree structure of instances of typePsXmlNode.- Parameters:
rsrcFile- full name of resource file- Returns:
trueif loading was successful
-
getXml
public static PsXmlSrc getXml()
Fills an XML tree with data from this instance, for example, to print to file.- Returns:
- XML tree filled with data from this instance.
-
setXml
public static void setXml(PsXmlSrc src)
Fill this instance with data from an XML source, for example, previously read from file.- Parameters:
src- XML source used to fill this instance with data.
-
getMonitorType
public static int getMonitorType()
Get the type of monitor, basically get an ID from which its size can be determined. Possible values seePsJavaView#MONITOR_UXGAand similar values.- Since:
- JavaView 4.91.003
- See Also:
setMonitorType(int)- Version:
- 27.02.18, 1.00 created (kp)
-
setMonitorType
public static void setMonitorType(int type)
Set the title of the resource description.- Since:
- JavaView 4.91.003
- See Also:
getMonitorType()- Version:
- 27.02.18, 1.00 created (kp)
-
getWindowSize
public static int[] getWindowSize(int windowId)
Get default position and size a window or dialog of the current active monitor type.- Parameters:
windowId- Identifier of a window as specified in PsJavaView, e.g. WINDOW_CONTROL.- Returns:
- int[4] vector with x and y position and height and width of window.
- See Also:
getMonitorType(),setMonitorType(int)- Version:
- 27.02.18, 1.20 revised (kp) Doc improved.
24.03.03, 1.10 revised (kp) Method made static.
-
setWindowSize
public static boolean setWindowSize(int windowId, int[] windowSize)Set default position and size a window or dialog of the current active monitor type.- Parameters:
windowId- Identifier of a window as specified in PsJavaView, e.g. WINDOW_CONTROL.windowSize- position and dimension of dialog resp. window.- See Also:
getMonitorType(),setMonitorType(int)- Version:
- 27.02.18, 1.00 created (kp)
-
-
"