com.infoteria.gui.property
Class AbstractProperty
java.lang.Object
|
+--com.infoteria.gui.property.AbstractProperty
- All Implemented Interfaces:
- Cloneable, Property
- Direct Known Subclasses:
- BooleanProperty, ColorProperty, DatetimeProperty, FileProperty, IconProperty, MappingProperty, NumberProperty, PointProperty, PropertyGroup, SQLBuilderProperty, StringProperty, VariantProperty, XMLDocumentProperty
- public abstract class AbstractProperty
- extends Object
- implements Property, Cloneable
PropertyインターフェースのAbstaractな実装です。
基本的にはPropertyを作成する場合はこのクラスを継承して作成します。
Methods inherited from interface com.infoteria.gui.property.Property |
getType |
PROPERTY_NSURI
public static final String PROPERTY_NSURI
ELEM_PROPERTY
protected static final String ELEM_PROPERTY
ATTR_TYPE
protected static final String ATTR_TYPE
ATTR_NAME
protected static final String ATTR_NAME
ATTR_DISPLAY_NAME
protected static final String ATTR_DISPLAY_NAME
ATTR_READONLY
protected static final String ATTR_READONLY
ATTR_VISIBLE
protected static final String ATTR_VISIBLE
_listenerList
protected EventListenerList _listenerList
AbstractProperty
protected AbstractProperty(PropertyHolder owner,
String name)
AbstractProperty
protected AbstractProperty(String name)
getName
public String getName()
- Description copied from interface:
Property
- プロパティ名を返します。
- Specified by:
getName
in interface Property
getOwner
public PropertyHolder getOwner()
- Description copied from interface:
Property
- プロパティのオーナーを返します。
- Specified by:
getOwner
in interface Property
setOwner
public void setOwner(PropertyHolder owner)
- Description copied from interface:
Property
- プロパティのオーナーを設定します。
- Specified by:
setOwner
in interface Property
getDisplayName
public String getDisplayName()
- Description copied from interface:
Property
- 表示名を返します。
- Specified by:
getDisplayName
in interface Property
setDisplayName
public void setDisplayName(String name)
- Description copied from interface:
Property
- 表示名を設定します。
- Specified by:
setDisplayName
in interface Property
getValue
public Object getValue()
- Description copied from interface:
Property
- プロパティ値を返します。
- Specified by:
getValue
in interface Property
setValue
public UndoableEdit setValue(Object o)
throws PropertyException
- Description copied from interface:
Property
- プロパティ値を設定し、そのUndo情報を返します。
- Specified by:
setValue
in interface Property
setValue
public abstract UndoableEdit setValue(Object o,
boolean canUndo)
throws PropertyException
- Description copied from interface:
Property
- プロパティ値を設定します。
Undo情報を返す必要がない場合はcanUndoにfalseを指定します。
- Specified by:
setValue
in interface Property
setValueAsString
public abstract UndoableEdit setValueAsString(String o,
boolean canUndo)
throws PropertyException
- Description copied from interface:
Property
- プロパティ値を文字列で設定します。
Undo情報を返す必要がない場合はcanUndoにfalseを指定します。
- Specified by:
setValueAsString
in interface Property
getValueAsString
public String getValueAsString()
- Description copied from interface:
Property
- プロパティ値を文字列で返します。
- Specified by:
getValueAsString
in interface Property
setValueAsString
public UndoableEdit setValueAsString(String o)
throws PropertyException
- Description copied from interface:
Property
- プロパティ値を文字列で設定し、そのUndo情報を返します。
- Specified by:
setValueAsString
in interface Property
isEditable
public boolean isEditable()
- Description copied from interface:
Property
- プロパティが編集可能であるかどうかを返します。
- Specified by:
isEditable
in interface Property
setEditable
public void setEditable(boolean b)
- Description copied from interface:
Property
- プロパティが編集可能であるかどうかを設定します。
- Specified by:
setEditable
in interface Property
isVisible
public boolean isVisible()
- Description copied from interface:
Property
- プロパティが表示されるかどうかを返します。
- Specified by:
isVisible
in interface Property
setVisible
public void setVisible(boolean b)
- Description copied from interface:
Property
- プロパティが表示されるかどうかを設定します。
- Specified by:
setVisible
in interface Property
getTooltip
public String getTooltip()
- Description copied from interface:
Property
- ツールチップを返します。
- Specified by:
getTooltip
in interface Property
setTooltip
public void setTooltip(String s)
- Description copied from interface:
Property
- ツールチップを設定します。
- Specified by:
setTooltip
in interface Property
getEditor
public PropertyEditor getEditor()
- Description copied from interface:
Property
- PropertyEditorを返します。
- Specified by:
getEditor
in interface Property
setEditor
public void setEditor(PropertyEditor editor)
- Description copied from interface:
Property
- PropertyEditorを設定します。
- Specified by:
setEditor
in interface Property
getRenderer
public PropertyRenderer getRenderer()
- Description copied from interface:
Property
- PropertyRendererを返します。
- Specified by:
getRenderer
in interface Property
setRenderer
public void setRenderer(PropertyRenderer renderer)
- Description copied from interface:
Property
- PropertyRendererを設定します。
- Specified by:
setRenderer
in interface Property
doSetValue
protected UndoableEdit doSetValue(Object o,
boolean canUndo)
throws PropertyChangeVetoException
- プロパティ値を設定するメソッドです。
setValue/setValueAsStringの実装では最終的にこのメソッドを実行してください。
このメソッドにより適切なUndoableEditが作成され、適切なタイミングでPropertyChangeListenerが実行されます。
getAdapter
public Object getAdapter(Class clazz)
- Description copied from interface:
Property
- Adapterを返します。
- Specified by:
getAdapter
in interface Property
createUndoableEdit
protected UndoableEdit createUndoableEdit(Object oldValue,
Object newValue)
- UndoableEditの作成メソッド
デフォルトではPrpoertyUndoableEditが作成されます。
必要に応じてオーバーライドしてください。
clone
public Object clone()
- Description copied from interface:
Property
- プロパティを複製します。
- Specified by:
clone
in interface Property
- Overrides:
clone
in class Object
doClone
protected void doClone(AbstractProperty prop)
- cloneメソッドの実装部分
DeepCopyが必要な場合はオーバーライドしてください。
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener l)
- Description copied from interface:
Property
- プロパティにPropertyChangeListenerを追加します。
- Specified by:
addPropertyChangeListener
in interface Property
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener l)
- Description copied from interface:
Property
- プロパティからPropertyChangeListenerを削除します。
- Specified by:
removePropertyChangeListener
in interface Property
getPropertyChangeListeners
public PropertyChangeListener[] getPropertyChangeListeners()
- Description copied from interface:
Property
- このプロパティに登録されているすべてのPropertyChangeListenerを返します。
- Specified by:
getPropertyChangeListeners
in interface Property
assign
public void assign(Element el)
- Description copied from interface:
Property
- XMLの要素からプロパティ値を設定します。
- Specified by:
assign
in interface Property
assignTo
public void assignTo(Element el)
- Description copied from interface:
Property
- XMLの要素にプロパティ値を設定します。
- Specified by:
assignTo
in interface Property
valueEquals
public boolean valueEquals(Property prop)
- Description copied from interface:
Property
- プロパティの設定値を比較します
- Specified by:
valueEquals
in interface Property
getDifference
public com.infoteria.gui.diff.Difference getDifference(Property prop)
- Description copied from interface:
Property
- プロパティ値の差分を返します
- Specified by:
getDifference
in interface Property
doGetDifference
protected com.infoteria.gui.diff.Difference doGetDifference(Property prop)