com.infoteria.gui.property
Class XMLDocumentProperty

java.lang.Object
  |
  +--com.infoteria.gui.property.AbstractProperty
        |
        +--com.infoteria.gui.property.XMLDocumentProperty
All Implemented Interfaces:
Cloneable, MetaData, Property

public class XMLDocumentProperty
extends AbstractProperty
implements MetaData

XMLDocumentプロパティ
org.w3c.dom.Documentを扱うためのプロパティです。


Field Summary
static String PROPERTY_TYPE
           
 
Fields inherited from class com.infoteria.gui.property.AbstractProperty
_listenerList, ATTR_DISPLAY_NAME, ATTR_NAME, ATTR_READONLY, ATTR_TYPE, ATTR_VISIBLE, ELEM_PROPERTY, PROPERTY_NSURI
 
Constructor Summary
XMLDocumentProperty(PropertyHolder owner, String name)
           
XMLDocumentProperty(String name)
           
 
Method Summary
 void assign(Element el)
           
 void assignTo(Element el)
           
protected  void doClone(AbstractProperty prop)
           
protected  com.infoteria.gui.diff.Difference doGetDifference(Property prop)
           
 Document getDocument()
          プロパティ値として設定されているDocumentを返します。
 String getType()
           
 String getValueAsString()
           
 boolean isNormalizeWhitespace()
          Documentの設定の際に不要なSpaceが削除されるかどうかを取得します。
 UndoableEdit loadFromFile(File f)
          XMLファイルを読み込んでDocumentをプロパティ値に設定します。
 void saveToFile(File f, boolean bIndent)
          プロパティ値として設定されているDocumentをファイルに保存します。
 void setNormalizeWhitespace(boolean b)
          Documentの設定の際に不要なSpaceが削除されるかどうかを設定します。
 void setup(Element el)
           
 UndoableEdit setValue(Object o, boolean canUndo)
           
 UndoableEdit setValueAsString(String o, boolean canUndo)
           
 boolean valueEquals(Property prop)
           
 
Methods inherited from class com.infoteria.gui.property.AbstractProperty
addPropertyChangeListener, clone, createUndoableEdit, doSetValue, getAdapter, getDifference, getDisplayName, getEditor, getName, getOwner, getPropertyChangeListeners, getRenderer, getTooltip, getValue, isEditable, isVisible, removePropertyChangeListener, setDisplayName, setEditable, setEditor, setOwner, setRenderer, setTooltip, setValue, setValueAsString, setVisible
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.infoteria.gui.util.MetaData
clone
 

Field Detail

PROPERTY_TYPE

public static final String PROPERTY_TYPE
Constructor Detail

XMLDocumentProperty

public XMLDocumentProperty(PropertyHolder owner,
                           String name)

XMLDocumentProperty

public XMLDocumentProperty(String name)
Method Detail

getType

public String getType()
Description copied from interface: Property
プロパティ型を返します。

isNormalizeWhitespace

public boolean isNormalizeWhitespace()
Documentの設定の際に不要なSpaceが削除されるかどうかを取得します。

setNormalizeWhitespace

public void setNormalizeWhitespace(boolean b)
Documentの設定の際に不要なSpaceが削除されるかどうかを設定します。

setValue

public UndoableEdit setValue(Object o,
                             boolean canUndo)
                      throws PropertyException
Description copied from interface: Property
プロパティ値を設定します。
Undo情報を返す必要がない場合はcanUndoにfalseを指定します。
Overrides:
setValue in class AbstractProperty

setValueAsString

public UndoableEdit setValueAsString(String o,
                                     boolean canUndo)
                              throws PropertyException
Description copied from interface: Property
プロパティ値を文字列で設定します。
Undo情報を返す必要がない場合はcanUndoにfalseを指定します。
Overrides:
setValueAsString in class AbstractProperty

getDocument

public Document getDocument()
プロパティ値として設定されているDocumentを返します。

getValueAsString

public String getValueAsString()
Description copied from interface: Property
プロパティ値を文字列で返します。
Overrides:
getValueAsString in class AbstractProperty

doClone

protected void doClone(AbstractProperty prop)
Description copied from class: AbstractProperty
cloneメソッドの実装部分 DeepCopyが必要な場合はオーバーライドしてください。
Overrides:
doClone in class AbstractProperty

assign

public void assign(Element el)
Description copied from interface: Property
XMLの要素からプロパティ値を設定します。
Overrides:
assign in class AbstractProperty

assignTo

public void assignTo(Element el)
Description copied from interface: Property
XMLの要素にプロパティ値を設定します。
Overrides:
assignTo in class AbstractProperty

setup

public void setup(Element el)
Description copied from interface: MetaData
定義情報のある要素から設定情報を自身に反映します。
Specified by:
setup in interface MetaData

saveToFile

public void saveToFile(File f,
                       boolean bIndent)
                throws IOException
プロパティ値として設定されているDocumentをファイルに保存します。

loadFromFile

public UndoableEdit loadFromFile(File f)
                          throws IOException
XMLファイルを読み込んでDocumentをプロパティ値に設定します。

valueEquals

public boolean valueEquals(Property prop)
Description copied from interface: Property
プロパティの設定値を比較します
Overrides:
valueEquals in class AbstractProperty

doGetDifference

protected com.infoteria.gui.diff.Difference doGetDifference(Property prop)
Overrides:
doGetDifference in class AbstractProperty