com.togethersoft.openapi.ide.command
Class IdeCommandConstraints

com.togethersoft.openapi.util.properties.DictionaryProperties
  |
  +--com.togethersoft.openapi.ide.command.IdeCommandConstraints

public class IdeCommandConstraints
extends DictionaryProperties

Defines the domain of applicability for the command item (IdeCommandItem or IdeCommandGroup).

IdeCommandConstraints() constructor creates an "empty" constraint object which doesn't define any constraints for the command item.

The string in IdeCommandConstraints(String) constructor contains the constraints separated with a comma. A constraint is a string "nameOfTheConstraint = value" pair. This class contains a set of constants with the possible names of constraints:

In previous examples we directly used the values of constraints defined in this interface. Of course, it is possible to write it in the right style (the last example):


 IdeCommandContraints rightWayIsTough = new IdeCommandConstraints(IdeCommandConstraints.CONTEXT+"="+IdeCommandConstraints.ELEMENT+","+IdeCommandConstraints.SHAPE_TYPE+"="+RwiShapeType.CLASS+","+IdeCommandConstraints.PARENT+"=IDOfTheParent,"+IdeCommandConstraints.LOCATION+"="+IdeCommandConstraints.POPUP_MENU_LOCATION); // 8=)

Author:
TogetherSoft
See Also: IdeCommandManager.createItem(java.lang.String,com.togethersoft.openapi.ide.command.IdeCommandConstraints,com.togethersoft.openapi.ide.command.IdeCommandListener), IdeCommandManager.createGroup(java.lang.String,com.togethersoft.openapi.ide.command.IdeCommandConstraints,com.togethersoft.openapi.ide.command.IdeCommandCheckListener), IdeCommandItem

Field Summary
 final static StringCONTEXT
           The value is "context".
 final static StringELEMENT_CONTEXT
           The value is "element".
 final static StringEXTENSION
           
 final static StringFILE_CATEGORY
           The value is "fileCategory".
 final static StringFILE_CONTEXT
           The value is "file".
 final static StringLOCATION
           The value is "location".
 final static StringMAIN_MENU_LOCATION
           The value is "mainMenu".
 final static StringMAIN_TOOLBAR_LOCATION
           The value is "mainToolbar".
 final static StringPARENT
           The value is "parent".
 final static StringPLACE_AFTER
           The value is "placeAfter".
 final static StringPLACE_BEFORE
           The value is "placeBefore".
 final static StringPOPUP_MENU_LOCATION
           The value is "popupMenu".
 final static StringSHAPE_TYPE
           The value is "shapeType".
 final static StringTEXT_EDITOR_CONTEXT
           The value is "textEditor".

Constructor Summary
IdeCommandConstraints()
           IdeCommandConstraints() constructor creates an "empty" constraint object which doesn't define any constraints for the command item.
IdeCommandConstraints(String values)
           Creates a constraint object.

Methods inherited from class com.togethersoft.openapi.util.properties.DictionaryProperties
addPropertyChangeListener, addVetoableChangeListener, clear, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getImplementation, getProperty, propertyNames, putProperty, removePropertyChangeListener, removeVetoableChangeListener

Field Detail

CONTEXT

public final static String CONTEXT
The value is "context".

ELEMENT_CONTEXT

public final static String ELEMENT_CONTEXT
The value is "element".

EXTENSION

public final static String EXTENSION

FILE_CATEGORY

public final static String FILE_CATEGORY
The value is "fileCategory".

FILE_CONTEXT

public final static String FILE_CONTEXT
The value is "file".

LOCATION

public final static String LOCATION
The value is "location".

MAIN_MENU_LOCATION

public final static String MAIN_MENU_LOCATION
The value is "mainMenu".

MAIN_TOOLBAR_LOCATION

public final static String MAIN_TOOLBAR_LOCATION
The value is "mainToolbar".

PARENT

public final static String PARENT
The value is "parent".

PLACE_AFTER

public final static String PLACE_AFTER
The value is "placeAfter".

PLACE_BEFORE

public final static String PLACE_BEFORE
The value is "placeBefore".

POPUP_MENU_LOCATION

public final static String POPUP_MENU_LOCATION
The value is "popupMenu".

SHAPE_TYPE

public final static String SHAPE_TYPE
The value is "shapeType".

TEXT_EDITOR_CONTEXT

public final static String TEXT_EDITOR_CONTEXT
The value is "textEditor".
Constructor Detail

IdeCommandConstraints

public IdeCommandConstraints()
IdeCommandConstraints() constructor creates an "empty" constraint object which doesn't define any constraints for the command item.

IdeCommandConstraints

public IdeCommandConstraints(String values)
Creates a constraint object. See the description of this interface for details.
Parameters:
values - String of comma-delimited constraints

Association Links

to Class java.lang.String

The value is "location".

to Class java.lang.String

The value is "mainMenu".

to Class java.lang.String

The value is "mainToolbar".

to Class java.lang.String

The value is "popupMenu".

to Class java.lang.String

The value is "placeBefore".

to Class java.lang.String

The value is "placeAfter".

to Class java.lang.String

The value is "parent".

to Class java.lang.String

The value is "context".

to Class java.lang.String

The value is "element".

to Class java.lang.String

The value is "file".

to Class java.lang.String

The value is "textEditor".

to Class java.lang.String

The value is "shapeType".

to Class java.lang.String

to Class java.lang.String

The value is "fileCategory".