public abstract class FormObject extends Object
Modifier and Type | Field and Description |
---|---|
static Object |
NULL_VALUE
A property value that explicitly sets a property to
null . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Final method disallows overriding.
|
<T> T |
getClientProperty(Object key)
For internal use only.
|
Iterator<Map.Entry<String,Object>> |
getProperties()
Returns an iterator over the properties in this object.
|
Object |
getProperty(String name)
Returns the value of a property (or
null if inexistent). |
Object |
getProperty(String name,
Object def)
Returns the value of a property (or
def if inexistent). |
boolean |
getPropertyBoolean(String name)
Convenience method to get a boolean property value.
|
boolean |
getPropertyBoolean(String name,
boolean def)
Convenience method to get a boolean property value.
|
int |
getPropertyCount()
Returns the number of properties in this object.
|
double |
getPropertyDouble(String name)
Convenience method to get a double property value.
|
double |
getPropertyDouble(String name,
double def)
Convenience method to get a double property value.
|
int |
getPropertyInt(String name)
Convenience method to get an integer property value.
|
int |
getPropertyInt(String name,
int def)
Convenience method to get an integer property value.
|
Iterator<String> |
getPropertyNames()
Returns an iterator over the property names in this object.
|
String |
getPropertyString(String name)
Convenience method to get a String property value.
|
String |
getPropertyString(String name,
String def)
Convenience method to get a String property value.
|
int |
getReferenceCount()
For internal use only.
|
int |
hashCode()
Final method disallows overriding.
|
Iterable<Map.Entry<String,Object>> |
properties()
Returns an iterator over the properties in this object.
|
Iterable<String> |
propertyNames()
Returns an iterator over the property names in this object.
|
void |
putClientProperty(Object key,
Object value)
For internal use only.
|
void |
setProperty(String name,
int index,
Object value)
Sets the value of a property.
|
void |
setProperty(String name,
Object value)
Sets the value of a property.
|
void |
setProperty(String name,
Object value,
Object def)
Sets the value of a property.
|
void |
setPropertyBoolean(String name,
boolean value)
Convenience method to set a boolean property value.
|
void |
setPropertyBoolean(String name,
boolean value,
boolean def)
Convenience method to set a boolean property value.
|
void |
setPropertyDouble(String name,
double value)
Convenience method to set a double property value.
|
void |
setPropertyDouble(String name,
double value,
double def)
Convenience method to set a double property value.
|
void |
setPropertyInt(String name,
int value)
Convenience method to set an integer property value.
|
void |
setPropertyInt(String name,
int value,
int def)
Convenience method to set an integer property value.
|
void |
setPropertyString(String name,
String value)
Convenience method to set an String property value.
|
String |
toString()
Returns a string representation of the object.
|
public static final Object NULL_VALUE
null
.
Example:
FormComponent label = new FormComponent("javax.swing.JLabel"); label.setProperty("text", FormComponent.NULL_VALUE);The same in Swing:
JLabel label = new JLabel(); label.setText(null);
public Object getProperty(String name)
null
if inexistent).public Object getProperty(String name, Object def)
def
if inexistent).public void setProperty(String name, int index, Object value)
public void setProperty(String name, Object value, Object def)
def
.public String getPropertyString(String name)
null
if the property is not a String or does not exist.public String getPropertyString(String name, String def)
def
if the property is not a String or does not exist.public void setPropertyString(String name, String value)
public int getPropertyInt(String name)
0
if the property is not an integer or does not exist.public int getPropertyInt(String name, int def)
def
if the property is not an integer or does not exist.public void setPropertyInt(String name, int value)
public void setPropertyInt(String name, int value, int def)
def
.public double getPropertyDouble(String name)
0
if the property is not an double or does not exist.public double getPropertyDouble(String name, double def)
def
if the property is not an double or does not exist.public void setPropertyDouble(String name, double value)
public void setPropertyDouble(String name, double value, double def)
def
.public boolean getPropertyBoolean(String name)
0
if the property is not an boolean or does not exist.public boolean getPropertyBoolean(String name, boolean def)
def
if the property is not an boolean or does not exist.public void setPropertyBoolean(String name, boolean value)
public void setPropertyBoolean(String name, boolean value, boolean def)
def
.public Iterable<Map.Entry<String,Object>> properties()
Iterator.next()
returns an java.util.Map.Entry
where the key is the property name and the value is the property value.public Iterator<Map.Entry<String,Object>> getProperties()
Iterator.next()
returns an java.util.Map.Entry
where the key is the property name and the value is the property value.public Iterable<String> propertyNames()
Iterator.next()
returns a String
.public Iterator<String> getPropertyNames()
Iterator.next()
returns a String
.public int getPropertyCount()
public <T> T getClientProperty(Object key)
public void putClientProperty(Object key, Object value)
public int getReferenceCount()
public final boolean equals(Object obj)
public final int hashCode()
Copyright (C) 2004-2019 FormDev Software GmbH. All rights reserved.