public class TPropertySheet extends ResizableTable implements twaver.base.obfuscate.view.Sheet
Element
properties or attributes.
You can use property sheet to display or edit attributes
for an Element object.
Property sheet works with TWaver TDataBox
to
gain element data. The property sheet always get all selected
elements of the connected databox and display all common
properties of all selected elements. That is, you can use
property sheet to display or edit attributes for a single
element or multiple elements.
Property sheet can group a set of attributes into a category. The category can be defined in XML file or by APIs. The category can be nested. The category can be expanded, collapsed, sorted or hided. Use the related APIs to operate property sheet.
The element attribute can be defined in the related XML file. A description text can be bound with each attribute in the XML file. The description will be displayed as the tooltip text of the table cell, or displayed on the bottom of the property sheet panel.
In most cases, you should put a property sheet into a
JScrollPane
and in that way the property sheet
is scrollable:
TDataBox box=new TDataBox(); TPropertySheet sheet=new TPropertySheet(box); JScrollPane scroll=new JScrollPane(sheet); ...You can also use TPropertySheetPane instead of the JScrollPane. TPropertySheetPane contains an internal toolbar on the top, a property description panel in the bottom, and a property sheet in the center. The toolbar contains a set of buttons used to control the property sheet, such as sort, expand or collpase categories, show or hide description information, etc. A JScrollPane will be created to contain the property sheet:
TDataBox box=new TDataBox(); TPropertySheet sheet=new TPropertySheet(box); TPropertySheetPane pane=new TPropertySheetPane(sheet);
TPropertySheetPane
,
TDataBox
,
Serialized Formjavax.swing.JTable.AccessibleJTable, javax.swing.JTable.DropLocation, javax.swing.JTable.PrintMode
javax.swing.JComponent.AccessibleJComponent
AUTO_RESIZE_ALL_COLUMNS, AUTO_RESIZE_LAST_COLUMN, AUTO_RESIZE_NEXT_COLUMN, AUTO_RESIZE_OFF, AUTO_RESIZE_SUBSEQUENT_COLUMNS, autoCreateColumnsFromModel, autoResizeMode, cellEditor, cellSelectionEnabled, columnModel, dataModel, defaultEditorsByColumnClass, defaultRenderersByColumnClass, editingColumn, editingRow, editorComp, gridColor, preferredViewportSize, rowHeight, rowMargin, rowSelectionAllowed, selectionBackground, selectionForeground, selectionModel, showHorizontalLines, showVerticalLines, tableHeader
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Constructor and Description |
---|
TPropertySheet()
Create a property sheet with an internal created
databox as the data source.
|
TPropertySheet(TDataBox box)
Create a property sheet with the given databox as the
data source.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertySheetListener(PropertySheetListener l) |
void |
addPropertyValueSettingListener(PropertyValueSettingListener l)
Add a property value setting licenter to the property sheet.
|
void |
collapseAllCategories()
Call this method to collapse all categories of this property sheet.
|
void |
ensureSelectedRowVisible()
Call this to ensure the selected row is scrolled to visible.
|
void |
expandAllCategories()
Call this method to expand all categories of this property sheet.
|
void |
firePropertySheetChanged(Category category) |
void |
firePropertySheetChanged(java.beans.PropertyChangeEvent e,
int rowIndex) |
void |
firePropertySheetChanged(PropertySheetEvent event) |
java.util.List |
getAllBeanInfo(Element element)
Gets a list contains all
BeanInfo objects for the specified element. |
java.util.List |
getAllPropertyDescriptors()
Get all property descriptors from sheet.
|
Category |
getCategoryByRowIndex(int rowIndex) |
java.util.Comparator |
getCategorySortingComparator()
Gets the comparator used for sorting category column.
|
javax.swing.table.TableCellEditor |
getCellEditor(int row,
int column)
Get table cell editor at specified location.
|
CellEditorManager |
getCellEditorManager()
Get table cell editor manager, which manage
all registered cell editors.
|
javax.swing.table.TableCellRenderer |
getCellRenderer(int row,
int column)
Get cell renderer at specified row and column.
|
CellRendererManager |
getCellRendererManager()
Get table cell renderer manager, which manage all
registered cell renderers.
|
javax.swing.Icon |
getCollapsedIcon()
Gets the category collapsed icon.
|
TDataBox |
getDataBox()
Get the property sheet connected databox.
|
java.util.List |
getDataBoxs()
Gets the connected data boxs.
|
java.lang.Object |
getDescription(Element element,
TPropertyDescriptor propertyDescriptor)
Gets description column value.
|
javax.swing.table.TableCellRenderer |
getDescriptionRenderer()
Gets description column renderer.
|
ElementAttribute |
getElementAttribute(int rowIndex)
Get element attribute by specified row index.
|
ElementAttributeVisibleFilter |
getElementAttributeVisibleFilter()
Get element attribute visible filter.
|
java.lang.Object |
getElementPropertyValue(TPropertyDescriptor property)
Get element property value by specified property descriptor.
|
java.util.List |
getElements() |
javax.swing.Icon |
getExpandedIcon()
Gets the category expanded icon.
|
java.awt.Color |
getGridColor()
Get grid color of this property sheet.
|
Element |
getLastSelectedElement()
Gets the last selected element.
|
int |
getMode()
Get property sheet displaying mode, the mode value is
used to tells the
property sheet show properties with categories, or
show properties no categories.
|
TPropertyDescriptor |
getPropertyDescriptorByPropertyName(java.lang.String propertyName)
Get property descriptor by property name.
|
TPropertyDescriptor |
getPropertyDescriptorByRowIndex(int rowIndex)
Get property descriptor by property sheet row index.
|
java.util.List |
getPropertyDescriptorsByCategoryName(java.lang.String categoryName)
Gets a list contains all
TPropertyDescriptor objects by the category name. |
java.lang.String |
getPropertyDisplayName(java.util.List elements,
TPropertyDescriptor property)
Rewrite this method to customize property display name.
|
int |
getPropertyDistinctLevel()
Gets the property distinct level.
|
javax.swing.table.TableCellRenderer |
getPropertyNameRenderer()
Get table cell renderer for property name column.
|
twaver.base.obfuscate.table.PropertySheetModel |
getPropertySheetModel()
Get property sheet model.
|
java.util.Comparator |
getPropertySortingComparator()
Gets the comparator used for sorting properties.
|
int |
getRowIndexByElementAttribute(ElementAttribute attribute) |
int |
getRowIndexByKey(java.lang.String key) |
java.util.Iterator |
getSelection()
Gets a iterator over all selected elements.
|
protected void |
init(twaver.base.obfuscate.table.PropertySheetModel model)
init property sheet
|
protected void |
initInputHandler()
init input handlers.
|
boolean |
isCategoryFontBold()
Determines whether the category font of this sheet is bold.
|
boolean |
isEditable()
Check whether the displayed element attributes is editable.
|
boolean |
isEnableCategoryInteraction()
Checks whether to enable category interaction(expand/collapse)
|
boolean |
isFillIndent()
Checks whether to fill indent.
|
boolean |
isIndentOpaque()
Determines whether the indent part of this sheet is opaque.
|
boolean |
isPropertyExtraIndent()
Returns whether this property sheet 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()
Gets whether this sheet is properties sorted.
|
boolean |
isVisible(ElementAttribute attribute)
Checks whether the specified element attribute is visible on this sheet.
|
void |
publish()
Publishes this sheet model data.
|
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 |
removePropertySheetListener(PropertySheetListener l) |
void |
removePropertyValueSettingListener(PropertyValueSettingListener l)
Remove the specified property value setting licenter
from this property sheet.
|
void |
resetModel()
Resets this sheet model data.
|
void |
selectRow(ElementAttribute attribute)
Select a row by an element attribute.
|
void |
setCategoryFontBold(boolean enableCategoryBoldFont)
Sets whether the category font of this sheet is bold.
|
void |
setCategorySortingComparator(java.util.Comparator categorySortingComparator)
Sets the comparator used for sorting category column.
|
void |
setCollapsedIcon(javax.swing.Icon collapsedIcon)
Sets the category collapsed icon.
|
void |
setDataBox(TDataBox box)
Set the specified databox as the connected databox.
|
void |
setDataBoxs(java.util.List boxs)
By default the sheet will connected a data box, but in some case
you can make the sheet connect to multi-databox(s), thus the sheet
will reflect the change of last data box's selection model.
|
void |
setDescriptionRenderer(javax.swing.table.TableCellRenderer descriptionRenderer)
Sets description column renderer.
|
void |
setEditable(boolean isEditable)
Set whether the displayed element attributes is editable in
this property sheet.
|
void |
setElement(Element element)
Sets a element for this list.
|
void |
setElementAttributeVisibleFilter(ElementAttributeVisibleFilter elementAttributeVisibleFilter)
Set element attribute visible filter.
|
void |
setElements(java.util.List elements)
Sets a list of elements for this sheet.
|
void |
setEnableCategoryInteraction(boolean enableCategoryInteraction)
Sets whether to enable category interaction(expand/collapse)
|
void |
setExpandedIcon(javax.swing.Icon expandedIcon)
Sets the category expanded icon.
|
void |
setFillIndent(boolean fillIndent)
Sets whether to fill indent
|
void |
setIndentOpaque(boolean indentOqaque)
Sets whether the indent part of this sheet 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 distinctLevel)
Sets the property distinct level.
|
void |
setPropertyExtraIndent(boolean isPropertyExtraIndent)
Sets whether this property sheet using an extra
indent for all attributes.
|
void |
setPropertyNameRenderer(javax.swing.table.TableCellRenderer propertyNameRenderer)
Set table cell renderer for property name column.
|
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 properties sorted.
|
void |
updateTViewUI()
Uses the method to update TView's UI when state that
is not listened by the TView change.
|
void |
updateUI() |
changeSelection, editCellAt, getResizingColumn, isColumnAutoResizable, isColumnResizable, isHeadAutoResizable, isRowResizable, packAllColumns, packAllColumns, packAllRows, packColumn, packColumn, setColumnAutoResizable, setColumnResizable, setHeadAutoResizable, setRowResizable
addColumn, addColumnSelectionInterval, addNotify, addRowSelectionInterval, clearSelection, columnAdded, columnAtPoint, columnMarginChanged, columnMoved, columnRemoved, columnSelectionChanged, configureEnclosingScrollPane, convertColumnIndexToModel, convertColumnIndexToView, convertRowIndexToModel, convertRowIndexToView, createDefaultColumnModel, createDefaultColumnsFromModel, createDefaultDataModel, createDefaultEditors, createDefaultRenderers, createDefaultSelectionModel, createDefaultTableHeader, createScrollPaneForTable, doLayout, editCellAt, editingCanceled, editingStopped, getAccessibleContext, getAutoCreateColumnsFromModel, getAutoCreateRowSorter, getAutoResizeMode, getCellEditor, getCellRect, getCellSelectionEnabled, getColumn, getColumnClass, getColumnCount, getColumnModel, getColumnName, getColumnSelectionAllowed, getDefaultEditor, getDefaultRenderer, getDragEnabled, getDropLocation, getDropMode, getEditingColumn, getEditingRow, getEditorComponent, getFillsViewportHeight, getIntercellSpacing, getModel, getPreferredScrollableViewportSize, getPrintable, getRowCount, getRowHeight, getRowHeight, getRowMargin, getRowSelectionAllowed, getRowSorter, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedColumn, getSelectedColumnCount, getSelectedColumns, getSelectedRow, getSelectedRowCount, getSelectedRows, getSelectionBackground, getSelectionForeground, getSelectionModel, getShowHorizontalLines, getShowVerticalLines, getSurrendersFocusOnKeystroke, getTableHeader, getToolTipText, getUI, getUIClassID, getUpdateSelectionOnSort, getValueAt, initializeLocalVars, isCellEditable, isCellSelected, isColumnSelected, isEditing, isRowSelected, moveColumn, paramString, prepareEditor, prepareRenderer, print, print, print, print, print, processKeyBinding, removeColumn, removeColumnSelectionInterval, removeEditor, removeNotify, removeRowSelectionInterval, resizeAndRepaint, rowAtPoint, selectAll, setAutoCreateColumnsFromModel, setAutoCreateRowSorter, setAutoResizeMode, setCellEditor, setCellSelectionEnabled, setColumnModel, setColumnSelectionAllowed, setColumnSelectionInterval, setDefaultEditor, setDefaultRenderer, setDragEnabled, setDropMode, setEditingColumn, setEditingRow, setFillsViewportHeight, setGridColor, setIntercellSpacing, setModel, setPreferredScrollableViewportSize, setRowHeight, setRowHeight, setRowMargin, setRowSelectionAllowed, setRowSelectionInterval, setRowSorter, setSelectionBackground, setSelectionForeground, setSelectionMode, setSelectionModel, setShowGrid, setShowHorizontalLines, setShowVerticalLines, setSurrendersFocusOnKeystroke, setTableHeader, setUI, setUpdateSelectionOnSort, setValueAt, sizeColumnsToFit, sizeColumnsToFit, sorterChanged, tableChanged, unconfigureEnclosingScrollPane, valueChanged
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public TPropertySheet()
public TPropertySheet(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 addPropertySheetListener(PropertySheetListener l)
public void removePropertySheetListener(PropertySheetListener l)
public void firePropertySheetChanged(java.beans.PropertyChangeEvent e, int rowIndex)
public void firePropertySheetChanged(Category category)
public void firePropertySheetChanged(PropertySheetEvent event)
public TDataBox getDataBox()
getDataBox
in interface TView
setDataBox(twaver.TDataBox)
public java.util.List getDataBoxs()
setDataBoxs(java.util.List)
public java.util.List getElements()
public void setDataBox(TDataBox box)
setDataBox
in interface TView
box
- TDataBox the connected databox.getDataBox()
,
setDataBoxs(java.util.List)
,
setElement(twaver.Element)
,
setElements(java.util.List)
public void setDataBoxs(java.util.List boxs)
boxs
- the multi-databox(s) for this sheet.setDataBox(twaver.TDataBox)
,
setElement(twaver.Element)
,
setElements(java.util.List)
public void setElement(Element element)
By default the sheet will monitor connected data box(s) to display selected element(s), but in some case you can force this sheet to display the specified element(s).Notice that if you specified element(s) for this sheet, the sheet will not take the connected data box(s) into account.
element
- the selected element to be displayed.setDataBox(twaver.TDataBox)
,
setDataBoxs(java.util.List)
,
setElements(java.util.List)
public void setElements(java.util.List elements)
By default the sheet will monitor connected data box(s) to display selected element(s), but in some case you can force this sheet to display the specified element(s).Notice that if you specified element(s) for this sheet, the sheet will not take the connected data box(s) into account.
elements
- a list of elements to be displayed.setDataBox(twaver.TDataBox)
,
setDataBoxs(java.util.List)
,
setElement(twaver.Element)
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 java.awt.Color getGridColor()
getGridColor
in class javax.swing.JTable
protected void initInputHandler()
initInputHandler
in class ResizableTable
protected void init(twaver.base.obfuscate.table.PropertySheetModel model)
model
- TPropertySheetModel sheet modelpublic javax.swing.table.TableCellRenderer getCellRenderer(int row, int column)
getCellRenderer
in class javax.swing.JTable
row
- int sheet row indexcolumn
- int sheet column indexpublic javax.swing.table.TableCellEditor getCellEditor(int row, int column)
getCellEditor
in class javax.swing.JTable
row
- int row indexcolumn
- int column indexpublic CellRendererManager getCellRendererManager()
getCellEditorManager()
public CellEditorManager getCellEditorManager()
getCellRendererManager()
public twaver.base.obfuscate.table.PropertySheetModel getPropertySheetModel()
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 ElementAttributeVisibleFilter getElementAttributeVisibleFilter()
getElementAttributeVisibleFilter
in interface twaver.base.obfuscate.view.Sheet
setElementAttributeVisibleFilter(twaver.ElementAttributeVisibleFilter)
public void setElementAttributeVisibleFilter(ElementAttributeVisibleFilter elementAttributeVisibleFilter)
setElementAttributeVisibleFilter
in interface twaver.base.obfuscate.view.Sheet
elementAttributeVisibleFilter
- ElementAttributeVisibleFilter the
visible filter to be used.getElementAttributeVisibleFilter()
public boolean isVisible(ElementAttribute attribute)
isVisible
in interface twaver.base.obfuscate.view.Sheet
attribute
- the element attribute to be checked.public TPropertyDescriptor getPropertyDescriptorByPropertyName(java.lang.String propertyName)
propertyName
- String the property name of the descriptorpublic TPropertyDescriptor getPropertyDescriptorByRowIndex(int rowIndex)
rowIndex
- int a row indexpublic Category getCategoryByRowIndex(int rowIndex)
public ElementAttribute getElementAttribute(int rowIndex)
rowIndex
- int a row locationpublic java.util.List getAllPropertyDescriptors()
public java.util.List getPropertyDescriptorsByCategoryName(java.lang.String categoryName)
TPropertyDescriptor
objects by the category name.categoryName
- the category name to be queried.TPropertyDescriptor
objects by the category name.public javax.swing.table.TableCellRenderer getPropertyNameRenderer()
public void setPropertyNameRenderer(javax.swing.table.TableCellRenderer propertyNameRenderer)
propertyNameRenderer
- public java.lang.Object getElementPropertyValue(TPropertyDescriptor property)
property
- TPropertyDescriptor a property descriptor.public void selectRow(ElementAttribute attribute)
attribute
- ElementAttribute the element attribute to be selected.public int getRowIndexByElementAttribute(ElementAttribute attribute)
public int getRowIndexByKey(java.lang.String key)
public void updateTViewUI()
updateTViewUI
in interface TView
public void updateUI()
updateUI
in class javax.swing.JTable
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 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 void setMode(int mode)
setMode
in interface twaver.base.obfuscate.view.Sheet
mode
- the mode to be used,legal values are:
getMode()
public int getMode()
getMode
in interface twaver.base.obfuscate.view.Sheet
setMode(int)
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
setSortingProperties(boolean)
public void setSortingProperties(boolean sortingProperties)
setSortingProperties
in interface twaver.base.obfuscate.view.Sheet
sortingProperties
- boolean true if
sheet is properties sorted, false otherwise.isSortingProperties()
public void collapseAllCategories()
expandAllCategories()
public void expandAllCategories()
collapseAllCategories()
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 void addPropertyValueSettingListener(PropertyValueSettingListener l)
l
- PropertyValueSettingListener the property
value setting licenter to be addedremovePropertyValueSettingListener(twaver.table.PropertyValueSettingListener)
public void removePropertyValueSettingListener(PropertyValueSettingListener l)
l
- PropertyValueSettingListener the property value setting licenter
to be removed.addPropertyValueSettingListener(twaver.table.PropertyValueSettingListener)
public void ensureSelectedRowVisible()
public int getPropertyDistinctLevel()
getPropertyDistinctLevel
in interface twaver.base.obfuscate.view.Sheet
public void setPropertyDistinctLevel(int distinctLevel)
setPropertyDistinctLevel
in interface twaver.base.obfuscate.view.Sheet
propertyDistinctLevel
- public void resetModel()
public boolean isCategoryFontBold()
isCategoryFontBold
in interface twaver.base.obfuscate.view.Sheet
public void setCategoryFontBold(boolean enableCategoryBoldFont)
setCategoryFontBold
in interface twaver.base.obfuscate.view.Sheet
isCategoryFontBold
- True if the category font of this sheet is bold, false otherwise.public boolean isIndentOpaque()
isIndentOpaque
in interface twaver.base.obfuscate.view.Sheet
public void setIndentOpaque(boolean indentOqaque)
setIndentOpaque
in interface twaver.base.obfuscate.view.Sheet
indentOpaque
- True if the indent part of this sheet is opaque. false otherwise.public javax.swing.Icon getCollapsedIcon()
public void setCollapsedIcon(javax.swing.Icon collapsedIcon)
expandedIcon
- the category collapsed icon.public javax.swing.Icon getExpandedIcon()
public void setExpandedIcon(javax.swing.Icon expandedIcon)
expandedIcon
- the category expanded icon.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 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 void publish()
public boolean isEnableCategoryInteraction()
public void setEnableCategoryInteraction(boolean enableCategoryInteraction)
enableCategoryInteraction
- True to enable category interaction, false otherwise.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 javax.swing.table.TableCellRenderer getDescriptionRenderer()
public void setDescriptionRenderer(javax.swing.table.TableCellRenderer descriptionRenderer)
setShowDescriptionColumn(boolean)
public boolean isFillIndent()
public void setFillIndent(boolean fillIndent)
public java.lang.String getPropertyDisplayName(java.util.List elements, TPropertyDescriptor property)
Copyright © 2002 - 2010 Serva Software. All Rights Reserved.