public class TWebPropertySheet extends java.lang.Object implements twaver.base.obfuscate.view.Sheet, TWebView
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AlarmStateRenderer |
static java.lang.String |
BooleanRenderer |
static java.lang.String |
ColorRenderer |
static java.lang.String |
DateRenderer |
static java.lang.String |
FontRenderer |
static java.lang.String |
ImageRenderer |
protected boolean |
isEditable |
static java.lang.String |
NumberRenderer |
static java.lang.String |
PointRenderer |
static java.lang.String |
StringRenderer |
Constructor and Description |
---|
TWebPropertySheet()
Create a property websheet with an internal created
databox as the data source.
|
TWebPropertySheet(TDataBox box)
Create a property websheet with the given databox as the
data source.
|
Modifier and Type | Method and Description |
---|---|
java.util.List |
getAllBeanInfo(Element element)
Gets a list contains all
BeanInfo objects for the specified element. |
java.util.List |
getAllPropertyDescriptors(Element element)
Get all property descriptors from sheet.
|
java.util.Comparator |
getCategorySortingComparator()
Gets the comparator used for sorting category column.
|
TDataBox |
getDataBox()
Get the property websheet connected databox.
|
java.lang.Object |
getDescription(Element element,
TPropertyDescriptor propertyDescriptor)
Gets description column value.
|
ElementAttributeVisibleFilter |
getElementAttributeVisibleFilter()
Gets the element attribute visible filter.
|
protected java.lang.String[] |
getElementCustomDisplayValueAndRenderer(ElementAttribute attribute,
java.lang.Object propertyValue) |
protected java.lang.String[] |
getElementDisplayValueAndRenderer(Element element,
TPropertyDescriptor property) |
protected java.lang.String[] |
getElementPreDefineDisplayValueAndRenderer(ElementAttribute attribute,
java.lang.Object propertyValue) |
protected java.lang.String |
getJavascriptRenderer(java.lang.String rendererClass,
java.lang.Object value) |
Element |
getLastSelectedElement()
Gets the last selected element.
|
int |
getMode()
Get property websheet displaying mode, the mode value is
used to tells the
property sheet show properties with categories, or
show properties no categories.
|
int |
getPropertyDistinctLevel()
Gets the property distinct level.
|
java.util.Comparator |
getPropertySortingComparator()
Gets the comparator used for sorting properties.
|
java.util.Iterator |
getSelection()
Gets a iterator over all selected elements.
|
java.lang.String |
getType() |
boolean |
isCategoryFontBold()
Determines whether the category font of this websheet is bold.
|
boolean |
isEditable()
Check whether the displayed element attributes is editable.
|
boolean |
isIndentOpaque()
Determines whether the indent part of this websheet is opaque.
|
boolean |
isPropertyExtraIndent()
Returns whether this property websheet using an extra
indent for all attributes.
|
boolean |
isRestoreCategoryState()
Determines whether to restore categories' expand and collapse state.
|
boolean |
isShowDescriptionColumn()
Checks whether to show description column.
|
boolean |
isSingleRootCategoryVisible()
Return whether the root category is visible if only has
one root category (top level category).
|
boolean |
isSortingAscending()
Determines whether to sorting properties and categories by ascending.
|
boolean |
isSortingCategories()
Check whether categories of this property sheet is sorted.
|
boolean |
isSortingProperties()
Determines whether this sheet is sorting properties.
|
boolean |
isVisible(ElementAttribute attribute)
Checks whether the specified element attribute is visible on this sheet.
|
void |
registerElementClassAttributes(java.lang.Class elementClass,
java.util.List attributes)
Registers the specified attributes for the specified element class.
|
void |
registerElementClassXML(java.lang.Class elementClass,
java.io.InputStream inputStream)
Registers the specified element class with the specified input stream.
|
void |
registerElementClassXML(java.lang.Class elementClass,
java.lang.String url)
Registers the specified xml's url for the specified element class.
|
void |
setCategoryFontBold(boolean isCategoryFontBold)
Sets whether the category font of this websheet is bold.
|
void |
setCategorySortingComparator(java.util.Comparator categorySortingComparator)
Sets the comparator used for sorting category column.
|
void |
setDataBox(TDataBox dataBox)
Set the specified databox as the connected databox.
|
void |
setEditable(boolean isEditable)
Set whether the displayed element attributes is editable in
this property websheet.
|
void |
setElementAttributeVisibleFilter(ElementAttributeVisibleFilter elementAttributeVisibleFilter)
Sets the element attribute visible filter
|
void |
setIndentOpaque(boolean indentOpaque)
Sets whether the indent part of this websheet is opaque.
|
void |
setMode(int mode)
Change property sheet displaying mode, tells the
property sheet show properties with categories, or
show properties no categories.
|
void |
setPropertyDistinctLevel(int propertyDistinctLevel)
Sets the property distinct level.
|
void |
setPropertyExtraIndent(boolean isPropertyExtraIndent)
Sets whether this property websheet using an extra
indent for all attributes.
|
void |
setPropertySortingComparator(java.util.Comparator propertySortingComparator)
Sets the comparator used for sorting property column.
|
void |
setRestoreCategoryState(boolean isRestoreCategoryState)
Sets whether to restore categories' expand and collapse state.
|
void |
setShowDescriptionColumn(boolean showDescriptionColumn)
Sets whether to show description column.
|
void |
setSingleRootCategoryVisible(boolean isSingleRootCategoryVisible)
Set whether the root category is visible if only has
one root category (top level category).
|
void |
setSortingAscending(boolean sortingAscending)
Sets whether to sorting properties and categories by ascending.
|
void |
setSortingCategories(boolean sortingCategories)
Set whether categories of this property sheet is sorted.
|
void |
setSortingProperties(boolean sortingProperties)
Sets whether this sheet is sorting properties.
|
void |
setType(java.lang.String type) |
java.lang.String |
toJSON(Element element)
Export the JSON of TWebPropertySheet for web.
|
void |
updateTViewUI()
Uses the method to update TView's UI.
|
public static final java.lang.String StringRenderer
public static final java.lang.String NumberRenderer
public static final java.lang.String ColorRenderer
public static final java.lang.String BooleanRenderer
public static final java.lang.String ImageRenderer
public static final java.lang.String DateRenderer
public static final java.lang.String PointRenderer
public static final java.lang.String FontRenderer
public static final java.lang.String AlarmStateRenderer
protected boolean isEditable
public TWebPropertySheet()
public TWebPropertySheet(TDataBox box)
box
- TDataBox the connected databox.public java.util.Iterator getSelection()
getSelection
in interface twaver.base.obfuscate.view.Sheet
public Element getLastSelectedElement()
getLastSelectedElement
in interface twaver.base.obfuscate.view.Sheet
public void setDataBox(TDataBox dataBox)
setDataBox
in interface TView
box
- TDataBox the connected databox.TView.getDataBox()
public TDataBox getDataBox()
getDataBox
in interface TView
setDataBox(twaver.TDataBox)
public void updateTViewUI()
TView
updateTViewUI
in interface TView
public java.util.Comparator getCategorySortingComparator()
getCategorySortingComparator
in interface twaver.base.obfuscate.view.Sheet
setCategorySortingComparator(java.util.Comparator)
public void setCategorySortingComparator(java.util.Comparator categorySortingComparator)
setCategorySortingComparator
in interface twaver.base.obfuscate.view.Sheet
categorySortingComparator
- Comparator the new comparator to be usedsetPropertySortingComparator(java.util.Comparator)
,
getCategorySortingComparator()
public boolean isIndentOpaque()
isIndentOpaque
in interface twaver.base.obfuscate.view.Sheet
public void setIndentOpaque(boolean indentOpaque)
setIndentOpaque
in interface twaver.base.obfuscate.view.Sheet
indentOpaque
- True if the indent part of this sheet is opaque. false otherwise.public boolean isCategoryFontBold()
isCategoryFontBold
in interface twaver.base.obfuscate.view.Sheet
public void setCategoryFontBold(boolean isCategoryFontBold)
setCategoryFontBold
in interface twaver.base.obfuscate.view.Sheet
isCategoryFontBold
- True if the category font of this sheet is bold, false otherwise.public boolean isEditable()
isEditable
in interface twaver.base.obfuscate.view.Sheet
setEditable(boolean)
public void setEditable(boolean isEditable)
setEditable
in interface twaver.base.obfuscate.view.Sheet
isEditable
- boolean true if attribute is editable,
false read only.isEditable
public boolean isRestoreCategoryState()
isRestoreCategoryState
in interface twaver.base.obfuscate.view.Sheet
public void setRestoreCategoryState(boolean isRestoreCategoryState)
setRestoreCategoryState
in interface twaver.base.obfuscate.view.Sheet
isRestoreCategoryState
- True to restore categories' expand and collapse state, false otherwise.public boolean isPropertyExtraIndent()
isPropertyExtraIndent
in interface twaver.base.obfuscate.view.Sheet
setPropertyExtraIndent(boolean)
public void setPropertyExtraIndent(boolean isPropertyExtraIndent)
setPropertyExtraIndent
in interface twaver.base.obfuscate.view.Sheet
isPropertyExtraIndent
- boolean true if the extra indent
should be used, false otherwise.isPropertyExtraIndent
public boolean isSingleRootCategoryVisible()
isSingleRootCategoryVisible
in interface twaver.base.obfuscate.view.Sheet
setSingleRootCategoryVisible(boolean)
public void setSingleRootCategoryVisible(boolean isSingleRootCategoryVisible)
setSingleRootCategoryVisible
in interface twaver.base.obfuscate.view.Sheet
isSingleRootCategoryVisible
- boolean true if single root
category is visible, false otherwise.isSingleRootCategoryVisible
public int getMode()
getMode
in interface twaver.base.obfuscate.view.Sheet
setMode(int)
public void setMode(int mode)
setMode
in interface twaver.base.obfuscate.view.Sheet
mode
- the mode to be used,legal values are:
getMode()
public int getPropertyDistinctLevel()
getPropertyDistinctLevel
in interface twaver.base.obfuscate.view.Sheet
public void setPropertyDistinctLevel(int propertyDistinctLevel)
setPropertyDistinctLevel
in interface twaver.base.obfuscate.view.Sheet
propertyDistinctLevel
- public java.util.Comparator getPropertySortingComparator()
getPropertySortingComparator
in interface twaver.base.obfuscate.view.Sheet
setPropertySortingComparator(java.util.Comparator)
public void setPropertySortingComparator(java.util.Comparator propertySortingComparator)
setPropertySortingComparator
in interface twaver.base.obfuscate.view.Sheet
propertySortingComparator
- Comparator the new comparator to be usedsetCategorySortingComparator(java.util.Comparator)
,
getPropertySortingComparator()
public boolean isSortingCategories()
isSortingCategories
in interface twaver.base.obfuscate.view.Sheet
setSortingCategories(boolean)
public void setSortingCategories(boolean sortingCategories)
setSortingCategories
in interface twaver.base.obfuscate.view.Sheet
sortingCategories
- boolean true if categories of
this property sheet is sorted, false otherwise.isSortingCategories()
public boolean isSortingProperties()
isSortingProperties
in interface twaver.base.obfuscate.view.Sheet
public void setSortingProperties(boolean sortingProperties)
setSortingProperties
in interface twaver.base.obfuscate.view.Sheet
sortingCategories
- True if this sheet is sorting properties, false otherwise.public boolean isSortingAscending()
isSortingAscending
in interface twaver.base.obfuscate.view.Sheet
public void setSortingAscending(boolean sortingAscending)
setSortingAscending
in interface twaver.base.obfuscate.view.Sheet
sortingAscending
- True to sorting properties and categories by ascending, false by descending.public ElementAttributeVisibleFilter getElementAttributeVisibleFilter()
getElementAttributeVisibleFilter
in interface twaver.base.obfuscate.view.Sheet
public void setElementAttributeVisibleFilter(ElementAttributeVisibleFilter elementAttributeVisibleFilter)
setElementAttributeVisibleFilter
in interface twaver.base.obfuscate.view.Sheet
elementAttributeVisibleFilter
- the element attribute visible filterpublic boolean isVisible(ElementAttribute attribute)
isVisible
in interface twaver.base.obfuscate.view.Sheet
attribute
- the element attribute to be checked.public void registerElementClassXML(java.lang.Class elementClass, java.lang.String url)
elementClass
- element class type will be registeredurl
- xml location of this element classpublic void registerElementClassXML(java.lang.Class elementClass, java.io.InputStream inputStream)
elementClass
- element class type to be registeredinputStream
- the xml input stream.public void registerElementClassAttributes(java.lang.Class elementClass, java.util.List attributes)
elementClass
- element class type to be registeredattributes
- all attributes to be registeredpublic java.util.List getAllBeanInfo(Element element)
BeanInfo
objects for the specified element.getAllBeanInfo
in interface twaver.base.obfuscate.view.Sheet
element
- the element is being queriedBeanInfo
objects for the specified element.public java.util.List getAllPropertyDescriptors(Element element)
public java.lang.String toJSON(Element element)
element
- the exproted JSON descripe the elementprotected java.lang.String[] getElementDisplayValueAndRenderer(Element element, TPropertyDescriptor property)
protected java.lang.String[] getElementPreDefineDisplayValueAndRenderer(ElementAttribute attribute, java.lang.Object propertyValue)
protected java.lang.String[] getElementCustomDisplayValueAndRenderer(ElementAttribute attribute, java.lang.Object propertyValue)
protected java.lang.String getJavascriptRenderer(java.lang.String rendererClass, java.lang.Object value)
public boolean isShowDescriptionColumn()
isShowDescriptionColumn
in interface twaver.base.obfuscate.view.Sheet
public void setShowDescriptionColumn(boolean showDescriptionColumn)
setShowDescriptionColumn
in interface twaver.base.obfuscate.view.Sheet
public java.lang.Object getDescription(Element element, TPropertyDescriptor propertyDescriptor)
getDescription
in interface twaver.base.obfuscate.view.Sheet
public void setType(java.lang.String type)
Copyright © 2002 - 2010 Serva Software. All Rights Reserved.