jv.rsrc
Class PsAuthorInfo
- java.lang.Object
-
- jv.object.PsObject
-
- jv.rsrc.PsAuthorInfo
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, PsUpdateIf
public final class PsAuthorInfo extends PsObject
Information on one or more authors used throughout JavaView to tag resources files, licensee, creators of geometry objects etc.- See Also:
- Serialized Form
- Author:
- Konrad Polthier
- Version:
- 05.06.04, 2.20 revised (kp) New method toString() implemented.
16.02.04, 2.10 revised (kp) Copy and clone improved.
19.03.03, 2.00 revised (kp) Implementation continued.
20.04.00, 1.00 created (kp)
-
-
Field Summary
Fields Modifier and Type Field and Description static intADDRESSCode to access mailing address of authors with topics separated by '\n'.static intEMAILCode to access email address of authors.static intFIRST_NAMECode to access first name of authors.static intLAST_NAMECode to access last name of authors.static intORGANIZATIONCode to access organization of authors where they are employed.static intURLCode to access url of home page of authors.-
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 PsAuthorInfo()Information about authors with one array for each info topic.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.Objectclone()Duplicate object by recursively cloning all instance variables except inspector panels and lists of registered listeners.voidcopy(PsObject object)Copy argument object into this object by recursively copying all instance variables.java.lang.StringgetInfo(int ind, int code)Get information of author with given index.intgetMaxNumAuthors()Get the allowable maximal number of authors.intgetNumAuthors()Get number of authors.java.lang.StringgetProfession()Get the profession of a person, for example, the profession may be author, user, licensee.intgetSelectedAuthor()Get index of currently selected author.PsXmlNodegetXmlNode()Fills an XML subtree with data from this instance, for example, to print to file.voidinit()If instance has missing name then assign default name 'Object_NUMBER' where number is the total number of already created instances.booleanisEnabledLoading()Returns if the load button in the inspector is enabled which allows to load the author information from the rsrc file.voidsetEnabledLoading(boolean flag)Enable the load button in the inspector which allows to load the author information from the rsrc file.voidsetInfo(int ind, int code, java.lang.String name)Set information of author with given index.voidsetMaxNumAuthors(int num)Constrain the maximal number of authors.voidsetNumAuthors(int num)Set number of authors and allocate space use get/set methods for accessing instance variables.voidsetProfession(java.lang.String profession)Assign the profession of a person to appear as title in front of his personal information.voidsetSelectedAuthor(int ind)Select currently active author.intsetXmlNode(PsXmlNode node)Fill this instance with data from an XML node, for example, previously read from file.java.lang.StringtoString()Returns a string representation of all authors.-
Methods inherited from class jv.object.PsObject
addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, getFather, getInfoPanel, getInspector, getName, getNumObjects, getSymbol, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, newInspector, newInspector, removeInspector, removeInspector, removeUpdateListener, setName, setParent, setSymbol, setTag, update, updatePanels
-
-
-
-
Field Detail
-
FIRST_NAME
public static final int FIRST_NAME
Code to access first name of authors.- See Also:
- Constant Field Values
-
LAST_NAME
public static final int LAST_NAME
Code to access last name of authors.- See Also:
- Constant Field Values
-
ORGANIZATION
public static final int ORGANIZATION
Code to access organization of authors where they are employed.- See Also:
- Constant Field Values
-
ADDRESS
public static final int ADDRESS
Code to access mailing address of authors with topics separated by '\n'.- See Also:
- Constant Field Values
-
EMAIL
public static final int EMAIL
Code to access email address of authors.- See Also:
- Constant Field Values
-
URL
public static final int URL
Code to access url of home page of authors.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PsAuthorInfo
public PsAuthorInfo()
Information about authors with one array for each info topic. Info topics can be accessed with static variables.
-
-
Method Detail
-
init
public void init()
Description copied from class:PsObjectIf instance has missing name then assign default name 'Object_NUMBER' where number is the total number of already created instances.
-
clone
public java.lang.Object clone()
Duplicate object by recursively cloning all instance variables except inspector panels and lists of registered listeners.- Overrides:
clonein classPsObject- See Also:
PsObject.copy(PsObject)- Version:
- 17.11.00, 1.00 revised (kp)
17.11.00, 1.00 created (kp)
-
copy
public void copy(PsObject object)
Copy argument object into this object by recursively copying all instance variables.- Overrides:
copyin classPsObject- Since:
- JavaView 3.10.000
- See Also:
PsObject.clone()- Version:
- 16.02.04, 1.00 created (kp)
-
getSelectedAuthor
public int getSelectedAuthor()
Get index of currently selected author.
-
setSelectedAuthor
public void setSelectedAuthor(int ind)
Select currently active author.
-
getMaxNumAuthors
public int getMaxNumAuthors()
Get the allowable maximal number of authors.
-
setMaxNumAuthors
public void setMaxNumAuthors(int num)
Constrain the maximal number of authors. If existing number of authors is larger then the new (positive) maximal number, then the number of authors is reduced.
-
getNumAuthors
public int getNumAuthors()
Get number of authors. Other get/set methods to access indexed instance variables allow indices in the range [0,getNumAuthors()-1].
-
setNumAuthors
public void setNumAuthors(int num)
Set number of authors and allocate space use get/set methods for accessing instance variables. Number of authors may not exceed a (positive) maximal number of authors.
-
isEnabledLoading
public boolean isEnabledLoading()
Returns if the load button in the inspector is enabled which allows to load the author information from the rsrc file.- Returns:
trueif loading is enabled.
-
setEnabledLoading
public void setEnabledLoading(boolean flag)
Enable the load button in the inspector which allows to load the author information from the rsrc file.- Parameters:
flag-trueif loading is enabled.
-
getProfession
public java.lang.String getProfession()
Get the profession of a person, for example, the profession may be author, user, licensee.- Returns:
- profession of a person
-
setProfession
public void setProfession(java.lang.String profession)
Assign the profession of a person to appear as title in front of his personal information. For example, the profession may be author, user, licensee.- Parameters:
profession- profession of a person
-
getInfo
public java.lang.String getInfo(int ind, int code)Get information of author with given index.
-
setInfo
public void setInfo(int ind, int code, java.lang.String name)Set information of author with given index.- Parameters:
ind- must be in range [0,numAuthors-1].code- must be one of the code tags defined in PsAuthorInfo.name- new information given as string.
-
toString
public java.lang.String toString()
Returns a string representation of all authors. If there is a single author then the full address is returned, if there are multiple authors then just a list of author names is returned.
-
getXmlNode
public PsXmlNode getXmlNode()
Fills an XML subtree with data from this instance, for example, to print to file. Note, the child element of tag 'authors' is given by the profession attribute. E.g. the profession might be 'author' or 'licensee'.- Returns:
- XML tree filled with data from this instance.
-
setXmlNode
public int setXmlNode(PsXmlNode node)
Fill this instance with data from an XML node, for example, previously read from file. Argument element type must be 'authors'.- Parameters:
node- XML node of element type 'authors' used to fill this instance with data.
-
-
"