com.infoteria.gui.property
Class AbstractProperty
java.lang.Object
|
+--com.infoteria.gui.property.AbstractProperty
- All Implemented Interfaces:
- java.lang.Cloneable, Property
- Direct Known Subclasses:
- BooleanProperty, ColorProperty, DatetimeProperty, FileProperty, IconProperty, MappingProperty, NumberProperty, PointProperty, PropertyGroup, SQLBuilderProperty, StringProperty, VariantProperty, XMLDocumentProperty
- public abstract class AbstractProperty
- extends java.lang.Object
- implements Property, java.lang.Cloneable
PropertyインターフェースのAbstaractな実装です。
基本的にはPropertyを作成する場合はこのクラスを継承して作成します。
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.infoteria.gui.property.Property |
getType |
PROPERTY_NSURI
public static final java.lang.String PROPERTY_NSURI
ELEM_PROPERTY
protected static final java.lang.String ELEM_PROPERTY
ATTR_TYPE
protected static final java.lang.String ATTR_TYPE
ATTR_NAME
protected static final java.lang.String ATTR_NAME
ATTR_DISPLAY_NAME
protected static final java.lang.String ATTR_DISPLAY_NAME
ATTR_READONLY
protected static final java.lang.String ATTR_READONLY
ATTR_VISIBLE
protected static final java.lang.String ATTR_VISIBLE
_listenerList
protected javax.swing.event.EventListenerList _listenerList
AbstractProperty
protected AbstractProperty(PropertyHolder owner,
java.lang.String name)
AbstractProperty
protected AbstractProperty(java.lang.String name)
getName
public java.lang.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 java.lang.String getDisplayName()
- Description copied from interface:
Property
- 表示名を返します。
- Specified by:
getDisplayName in interface Property
setDisplayName
public void setDisplayName(java.lang.String name)
- Description copied from interface:
Property
- 表示名を設定します。
- Specified by:
setDisplayName in interface Property
getValue
public java.lang.Object getValue()
- Description copied from interface:
Property
- プロパティ値を返します。
- Specified by:
getValue in interface Property
setValue
public javax.swing.undo.UndoableEdit setValue(java.lang.Object o)
throws PropertyException
- Description copied from interface:
Property
- プロパティ値を設定し、そのUndo情報を返します。
- Specified by:
setValue in interface Property
setValue
public abstract javax.swing.undo.UndoableEdit setValue(java.lang.Object o,
boolean canUndo)
throws PropertyException
- Description copied from interface:
Property
- プロパティ値を設定します。
Undo情報を返す必要がない場合はcanUndoにfalseを指定します。
- Specified by:
setValue in interface Property
setValueAsString
public abstract javax.swing.undo.UndoableEdit setValueAsString(java.lang.String o,
boolean canUndo)
throws PropertyException
- Description copied from interface:
Property
- プロパティ値を文字列で設定します。
Undo情報を返す必要がない場合はcanUndoにfalseを指定します。
- Specified by:
setValueAsString in interface Property
getValueAsString
public java.lang.String getValueAsString()
- Description copied from interface:
Property
- プロパティ値を文字列で返します。
- Specified by:
getValueAsString in interface Property
setValueAsString
public javax.swing.undo.UndoableEdit setValueAsString(java.lang.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 java.lang.String getTooltip()
- Description copied from interface:
Property
- ツールチップを返します。
- Specified by:
getTooltip in interface Property
setTooltip
public void setTooltip(java.lang.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 javax.swing.undo.UndoableEdit doSetValue(java.lang.Object o,
boolean canUndo)
throws PropertyChangeVetoException
- プロパティ値を設定するメソッドです。
setValue/setValueAsStringの実装では最終的にこのメソッドを実行してください。
このメソッドにより適切なUndoableEditが作成され、適切なタイミングでPropertyChangeListenerが実行されます。
getAdapter
public java.lang.Object getAdapter(java.lang.Class clazz)
- Description copied from interface:
Property
- Adapterを返します。
- Specified by:
getAdapter in interface Property
createUndoableEdit
protected javax.swing.undo.UndoableEdit createUndoableEdit(java.lang.Object oldValue,
java.lang.Object newValue)
- UndoableEditの作成メソッド
デフォルトではPrpoertyUndoableEditが作成されます。
必要に応じてオーバーライドしてください。
clone
public java.lang.Object clone()
- Description copied from interface:
Property
- プロパティを複製します。
- Specified by:
clone in interface Property- Overrides:
clone in class java.lang.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(org.w3c.dom.Element el)
- Description copied from interface:
Property
- XMLの要素からプロパティ値を設定します。
- Specified by:
assign in interface Property
assignTo
public void assignTo(org.w3c.dom.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)