| java.lang.Object org.netbeans.modules.visualweb.gravy.properties.Property
All known Subclasses: org.netbeans.modules.visualweb.gravy.properties.CheckBoxProperty, org.netbeans.modules.visualweb.gravy.properties.ComboBoxProperty, org.netbeans.modules.visualweb.gravy.properties.TextFieldProperty,
Property | public class Property (Code) | | Handles properties in IDE property sheets. Properties are grouped in
property sheet. Their are identified by their display names. Once you
have created a Property instance you can get value, set a new text value,
set a new value by index of possible options or open custom editor.
Usage:
PropertySheetOperator pso = new PropertySheetOperator("Properties of MyClass");
Property p = new Property(pso, "Name");
System.out.println("\nProperty name="+p.getName());
System.out.println("\nProperty value="+p.getValue());
p.setValue("ANewValue");
// set a new value by index where it is applicable
//p.setValue(2);
// open custom editor where it is applicable
//p.openEditor();
See Also: PropertySheetOperator |
Constructor Summary | |
public | Property(PropertySheetOperator propertySheetOper, String name) Waits for property with given name in specified property sheet. | public | Property(PropertySheetOperator propertySheetOper, int index) Waits for index-th property in specified property sheet.
Parameters: propertySheetOper - PropertySheetOperator where to find property. Parameters: index - index (row number) of property inside property sheet(starts at 0). | public | Property(ContainerOperator contOper, String name) Waits for property with given name in specified container.
Parameters: contOper - ContainerOperator where to find property. | public | Property(ContainerOperator contOper, int index) Waits for index-th property in specified container.
Parameters: contOper - ContainerOperator whete to find property. |
Method Summary | |
public boolean | canEditAsText() Returns true if this property can be edited as text by inplace text field. | public String | getName() Gets display name of this property. | public String | getRendererName() Returns class name of renderer used to render this property. | public String | getShortDescription() Gets short description for this property. | public String | getValue() Gets string representation of property value. | public boolean | isEditable() Returns true if this property is in editable state (it is being edited). | public boolean | isEnabled() Returns true if this property is enabled in property sheet, that means
it is possible to change its value by inplace editor. | public SheetButtonOperator | nameButtonOperator() Gets SheetButtonOperator instance of property's name button. | public void | openEditor() Opens custom property editor for the property by click on "..." button. | public void | setDefaultValue() Sets default value for this property. | public void | setValue(String textValue) Sets value of this property to specified text. | public void | setValue(int index) Sets value of this property by given index. | public void | startEditing() If this property is not editable, it scrolls to property and clicks
on name button. | public void | stopEditing() If this property is editable, it scrolls to property if needed and
clicks on name button. | public boolean | supportsCustomEditor() Checks whether this property supports custom editor. | public SheetButtonOperator | valueButtonOperator() Gets SheetButtonOperator instance of property's value button. |
CHECKBOX_RENDERER | final public static String CHECKBOX_RENDERER(Code) | | Class name of check box renderer.
|
COMBOBOX_RENDERER | final public static String COMBOBOX_RENDERER(Code) | | Class name of combo box renderer.
|
RADIOBUTTON_RENDERER | final public static String RADIOBUTTON_RENDERER(Code) | | Class name of radio button renderer.
|
SET_RENDERER | final public static String SET_RENDERER(Code) | | Class name of set renderer.
|
STRING_RENDERER | final public static String STRING_RENDERER(Code) | | Class name of string renderer.
|
contOper | protected ContainerOperator contOper(Code) | | Container to find property in
|
property | protected Node.Property property(Code) | | Instance of Node.Property.
|
Property | public Property(PropertySheetOperator propertySheetOper, String name)(Code) | | Waits for property with given name in specified property sheet.
Parameters: propertySheetOper - PropertySheetOperator where to find property. Parameters: name - property display name |
Property | public Property(PropertySheetOperator propertySheetOper, int index)(Code) | | Waits for index-th property in specified property sheet.
Parameters: propertySheetOper - PropertySheetOperator where to find property. Parameters: index - index (row number) of property inside property sheet(starts at 0). If there categories shown in property sheet,rows occupied by their names must by added to index. |
Property | public Property(ContainerOperator contOper, int index)(Code) | | Waits for index-th property in specified container.
Parameters: contOper - ContainerOperator whete to find property. It isrecommended to use PropertySheetOperator. Parameters: index - index (row number) of property inside property sheet(starts at 0)Property.Property(PropertySheetOperator,int) |
canEditAsText | public boolean canEditAsText()(Code) | | Returns true if this property can be edited as text by inplace text field.
It can be both for string renderer or combo box renderer.
true if this property can be edited, false otherwise |
getName | public String getName()(Code) | | Gets display name of this property.
It can differ from name given in constructor when only
substring of property name is used there.
display name of property |
getShortDescription | public String getShortDescription()(Code) | | Gets short description for this property. Short description is also
used in tooltip.
short description for this property. |
getValue | public String getValue()(Code) | | Gets string representation of property value.
value of property |
isEditable | public boolean isEditable()(Code) | | Returns true if this property is in editable state (it is being edited).
It is detected by presence of PropertySheetButton which stands
for property value in non editable state.
true - this property is being edited; false otherwiseProperty.setValue |
isEnabled | public boolean isEnabled()(Code) | | Returns true if this property is enabled in property sheet, that means
it is possible to change its value by inplace editor.
true if this property is enabled, false otherwise |
nameButtonOperator | public SheetButtonOperator nameButtonOperator()(Code) | | Gets SheetButtonOperator instance of property's name button. It returns
valid button even if properties were reordered.
SheetButtonOperator instance of name button |
openEditor | public void openEditor()(Code) | | Opens custom property editor for the property by click on "..." button.
It checks whether this property supports custom editor by method
Property.supportsCustomEditor .
|
setDefaultValue | public void setDefaultValue()(Code) | | Sets default value for this property. If default value is not available,
it does nothing.
|
setValue | public void setValue(String textValue)(Code) | | Sets value of this property to specified text. If a new value is
not accepted, an information or error dialog is displayed by IDE.
If property is not writable JemmyException is thrown.
Parameters: textValue - text to be set in property (e.g. "a new value","a new item from list", "false", "TRUE") |
setValue | public void setValue(int index)(Code) | | Sets value of this property by given index.
It is applicable for properties which can be changed by combo box.
If property doesn't support changing value by index JemmyException
is thrown.
Parameters: index - index of item to be selected from possible options |
startEditing | public void startEditing()(Code) | | If this property is not editable, it scrolls to property and clicks
on name button. Otherwise does nothing.
Property.setValue |
stopEditing | public void stopEditing()(Code) | | If this property is editable, it scrolls to property if needed and
clicks on name button. It cancels editing and sets original value back.
Property.setValue |
supportsCustomEditor | public boolean supportsCustomEditor()(Code) | | Checks whether this property supports custom editor.
true is property supports custom editor, false otherwise |
valueButtonOperator | public SheetButtonOperator valueButtonOperator()(Code) | | Gets SheetButtonOperator instance of property's value button. It returns
valid button even if properties were reordered.
SheetButtonOperator instance of value button |
|
|