|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
util.PropertyResources
util.PropertyBundles
stella.xml.TypeHelper
stella.jview.JTypeHelper
public class JTypeHelper
The extension to the normal type helper. This type helper allows construction of actions according to the Select, Exception, Fits, Setup and Object entries. Additionally, message output is directed to a status field, if present.
| Nested Class Summary | |
|---|---|
class |
JTypeHelper.ConstraintAction
The action that allows adjustment of a constraint. |
class |
JTypeHelper.DaughterAction
The action that allows input of a daughters list. |
static class |
JTypeHelper.Display
Layout test. |
class |
JTypeHelper.ExceptionAction
The action that allows adjustment of an exception. |
class |
JTypeHelper.FitsHeaderAction
The action that allows adjustment of additional fits parameters. |
class |
JTypeHelper.GainAction
The action that allows adjustment of a target gain. |
private class |
JTypeHelper.ItemIcon
An icon that draw a separator. |
class |
JTypeHelper.ObjectAction
The action that allows adjustment of an object. |
class |
JTypeHelper.ProposalAction
The action asociated to an abstract input. |
class |
JTypeHelper.RequiresAction
The action that allows input of a requirement. |
class |
JTypeHelper.SetupAction
The action that allows adjustment of a setup. |
class |
JTypeHelper.SuccessorAction
The action that allows input of a successor. |
class |
JTypeHelper.TimeslotAction
The action that allows adjustment of a timeslot. |
| Nested classes/interfaces inherited from class util.PropertyResources |
|---|
PropertyResources.URLResource |
| Field Summary | |
|---|---|
private Action |
abstractaction
The action linked to the target abstract. |
private List |
constraintactions
A list of actions assigned to constraints. |
private Action |
daughteraction
The action linked to the target daughters. |
private static int |
DEFABSTRACTROW
The number of lines in an abstract input dialog. |
private static Color |
DEFGREENCOLOR
The default status color. |
private static String |
DEFLABELBUNDLE
The name for the label resource bundle. |
private static int |
DEFLONGLABEL
The number of chars in a short label. |
private static Color |
DEFREDCOLOR
The default error color. |
private static String |
DEFRESOURCEBUNDLES
The resource bundles for localized labels and text. |
private static int |
DEFSHORTBUTTON
The number of chars in a short label. |
private static int |
DEFSHORTLABEL
The number of chars in a short label. |
private static String |
DEFURLRESOURCES
The resources to add to the classpath. |
private JPanel |
directtype
The representation of the type helper. |
private JElementDisplay |
element
We use a single element display for all element helpers. |
private List |
exceptionactions
A list of actions assigned to exceptions. |
private List |
fitsheaderactions
A list of actions assigned to fits header. |
private List |
gainactions
A list of actions assigned to gains. |
static String |
KEY_ABSTRACTROW
The number of lines in an abstract input dialogs. |
static String |
KEY_GREENCOLOR
The key denoting the color of done messages. |
static String |
KEY_LABELBUNDLE
The resource bundle name for localized labels. |
static String |
KEY_LONGLABEL
The number of chars in a short label. |
static String |
KEY_REDCOLOR
The key denoting the color of missing requirements. |
static String |
KEY_SHORTBUTTON
The number of chars in a short label. |
static String |
KEY_SHORTLABEL
The number of chars in a short label. |
private List |
objectactions
A list of actions assigned to objects. |
private Object |
parent
The parent of this helper. |
private Action |
requiresaction
The action linked to the target requirement. |
private List |
setupactions
A list of actions assigned to setups. |
private JStatusField |
status
The status field to pipe messages to. |
private Action |
successoraction
The action linked to the target successor. |
private List |
timeslotactions
A list of actions assigned to timeslots. |
| Fields inherited from class stella.xml.TypeHelper |
|---|
KEY_ABSTRACT, KEY_ACCESS, KEY_CONSTRAINTS, KEY_DAUGHTERS, KEY_EXCEPTIONS, KEY_FITSHEADERS, KEY_GAINS, KEY_HELPERCLASS, KEY_OBJECTS, KEY_PROPOSAL, KEY_RATEHOW, KEY_RATEWHEN, KEY_REQUIRES, KEY_SEQUENCE, KEY_SETUPS, KEY_SUCCESSOR, KEY_TIMESLOTS, KEY_TYPE |
| Fields inherited from class util.PropertyBundles |
|---|
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES |
| Fields inherited from class util.PropertyResources |
|---|
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset |
| Fields inherited from class util.PropertyContainer |
|---|
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR |
| Fields inherited from interface util.ResourceSupplying |
|---|
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME |
| Fields inherited from interface util.PropertySupplying |
|---|
CONFIG, KEY_CLASS |
| Constructor Summary | |
|---|---|
JTypeHelper(Map prop)
Constructs a new graphical representation of a type helper. |
|
| Method Summary | |
|---|---|
private int |
addElementHelper(Collection all,
List actions,
int x,
int y)
|
private void |
addHeader(String shortdesc,
String longdesc,
int x,
int y)
|
protected void |
error(String warn)
Issues an error message. |
Action |
getAbstractAction()
Returns the abstract action. |
private JLabel |
getClipLabel(String label,
int len)
|
List |
getConstraintActions()
Returns the list of constraints actions. |
Action |
getDaughterAction()
Returns the successor action. |
private JLabel |
getDefinedLabel(String label)
|
private JLabel |
getDefinedLabel(String label,
int len)
|
List |
getExceptionActions()
Returns the list of constraints actions. |
List |
getFitsHeaderActions()
Returns the list of constraints actions. |
List |
getGainActions()
Returns the list of constraints actions. |
Icon |
getIcon()
Might return an icon, if one was stated in the properties |
private String |
getLocalLabel(String key)
Returns the localized label by scanning the specified key in the KEY_LABELBUNDLE resource bundle. |
List |
getObjectActions()
Returns the list of constraints actions. |
Component |
getRepresentation()
We return a jpanel here that has a grid bag layout. |
Action |
getRequiresAction()
Returns the successor action. |
List |
getSetupActions()
Returns the list of constraints actions. |
private JLabel |
getShortLabel(String label)
|
Action |
getSuccessorAction()
Returns the successor action. |
List |
getTimeslotActions()
Returns the list of constraints actions. |
private JLabel |
getUndefinedLabel(String label)
|
private JLabel |
getUndefinedLabel(String label,
int len)
|
protected void |
info(String warn)
Issues an info message. |
void |
init()
Additionally initialize the actions. |
void |
setExpertMode(boolean expert)
Sets the expert mode. |
void |
setParent(Object father)
Sets the parent component. |
void |
setStatusField(JStatusField pipe)
Assigns the status field to the target helper. |
private String |
shortAction(String longaction)
Checks if an action string has periods. |
private boolean |
updateElementHelper(Component top,
ElementHelper edit,
String title)
Takes the specified element helper, pipes it into the element field and displays it. |
private void |
updatePanel()
|
protected void |
warn(String warn)
Issues a warning message. |
| Methods inherited from class util.PropertyBundles |
|---|
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource |
| Methods inherited from class util.PropertyResources |
|---|
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, keyCreate, keyCreate, reload, setApplet |
| Methods inherited from class util.PropertyContainer |
|---|
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface util.ResourceSupplying |
|---|
getResource, getResourceAsStream, getResources |
| Methods inherited from interface util.PropertySupplying |
|---|
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties |
| Field Detail |
|---|
public static final String KEY_LABELBUNDLE
public static final String KEY_ABSTRACTROW
public static final String KEY_LONGLABEL
public static final String KEY_SHORTLABEL
public static final String KEY_SHORTBUTTON
public static final String KEY_REDCOLOR
public static final String KEY_GREENCOLOR
private static final String DEFURLRESOURCES
private static final String DEFRESOURCEBUNDLES
private static final String DEFLABELBUNDLE
private static final int DEFABSTRACTROW
private static final int DEFLONGLABEL
private static final int DEFSHORTLABEL
private static final int DEFSHORTBUTTON
private static final Color DEFREDCOLOR
private static final Color DEFGREENCOLOR
private Object parent
JTargetHelper instance.
private JStatusField status
private JElementDisplay element
private JPanel directtype
private Action abstractaction
private Action successoraction
private Action requiresaction
private Action daughteraction
private List constraintactions
private List timeslotactions
private List gainactions
private List setupactions
private List exceptionactions
private List fitsheaderactions
private List objectactions
| Constructor Detail |
|---|
public JTypeHelper(Map prop)
| Method Detail |
|---|
public void init()
init in interface Initializableinit in class TypeHelperpublic void setStatusField(JStatusField pipe)
public void setParent(Object father)
JTypeHelper.ObjectAction additionally
invoke the action performed method of this listener, without
registering explicetly to the parent.
public void setExpertMode(boolean expert)
public Action getAbstractAction()
public Action getSuccessorAction()
public Action getDaughterAction()
public Action getRequiresAction()
public List getConstraintActions()
public List getTimeslotActions()
public List getGainActions()
public List getSetupActions()
public List getExceptionActions()
public List getFitsHeaderActions()
public List getObjectActions()
public Icon getIcon()
getIcon in interface Displayablepublic Component getRepresentation()
getRepresentation in interface Displayableprotected void error(String warn)
error in class TypeHelperprotected void warn(String warn)
warn in class TypeHelperprotected void info(String warn)
info in class TypeHelperprivate String getLocalLabel(String key)
KEY_LABELBUNDLE resource bundle.
private void updatePanel()
private void addHeader(String shortdesc,
String longdesc,
int x,
int y)
private int addElementHelper(Collection all,
List actions,
int x,
int y)
private JLabel getDefinedLabel(String label)
private JLabel getDefinedLabel(String label,
int len)
private JLabel getUndefinedLabel(String label)
private JLabel getUndefinedLabel(String label,
int len)
private JLabel getShortLabel(String label)
private JLabel getClipLabel(String label,
int len)
private boolean updateElementHelper(Component top,
ElementHelper edit,
String title)
element field and displays it. If the user presses okay and
the update flag is set, the element helper is updated.
private String shortAction(String longaction)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||