|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel com.jidesoft.grid.PropertyPane
public class PropertyPane
The PropertyPane is a wrapper around PropertyTable. It adds a toolbar and a description area so that make it more like a component.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected JComponent |
_descriptionPanel
|
protected JLabel |
_nameLabel
Display name of the beaninfo. |
String |
ACTION_ALPHEBETIC_VIEW
Action name of action to switch to alphabetic view. |
String |
ACTION_CATEGORIED_VIEW
Action name of action to switch to categorical view. |
String |
ACTION_COLLAPSE
Action name of action to collapse all. |
String |
ACTION_EXPAND
Action name of action to expand all. |
String |
ACTION_TOGGLE_DESCRIPTION
Action name of action to toggle description. |
static int |
BUTTONS_ALL
|
static int |
BUTTONS_DESCRIPTION
|
static int |
BUTTONS_EXPAND_COLLAPSE
|
static int |
BUTTONS_SORT
|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
PropertyPane()
Creates PropertyPane with an empty PropertyTable. |
|
PropertyPane(PropertyTable table)
Creates a new PropertyPane using PropertyTable. |
|
PropertyPane(PropertyTable table,
int visibleButtons)
Creates a new PropertyPane using PropertyTable and specify which buttons are visible. |
Method Summary | |
---|---|
protected JideButton |
createButton(Action action)
|
protected JComponent |
createDescriptionArea()
Creates the description area. |
protected JComponent |
createDescriptionPanel()
Creates the description panel. |
protected JPanel |
createDescriptionPanel(JComponent nameLabel,
JComponent descriptionArea)
Creates the description panel. |
protected Component |
createPropertyTablePanel(PropertyTable table)
Creates a panel that holds the property table. |
protected JComponent |
createToolBar()
Creates the tool bar component on top of the PropertyTable . |
protected JComponent |
createToolBarComponent()
Creates the toolbar component for the PropertyPane. |
Action |
getAction(String action)
Gets the built-in action. |
Color |
getBorderColor()
Gets the border color. |
protected ImageIcon |
getImageIcon(String name)
Gets the image icons that is used in PropertyPane. |
int |
getOrder()
Gets the order PropertyPane. |
PropertyTable |
getPropertyTable()
Gets the property table. |
protected String |
getResourceString(String key)
Gets the localized string from resource bundle. |
JScrollPane |
getScrollPane()
Gets the scroll pane that contains the PropertyTable . |
JComponent |
getToolBar()
Gets the toolbar which has the categorized and sorted buttons. |
boolean |
isShowDescription()
Is the description area visible. |
boolean |
isShowToolBar()
Is the toolbar visible. |
protected void |
resetDescription()
Resets the description to default name and description. |
void |
setBorderColor(Color borderColor)
Sets the border color. |
void |
setFont(Font font)
Override to set the font of description area along with the pane itself. |
void |
setOrder(int order)
Sets the order of property pane. |
void |
setShowDescription(boolean showDescription)
Sets the visibility of description area. |
void |
setShowToolBar(boolean showToolBar)
Sets the visibility of toolbar. |
void |
setViewportBackground(Color color)
Sets the bottom empty space of the PropertyPane background color. |
protected void |
updateDescription(String name,
String description)
Updates the name and description to description panel. |
void |
valueChanged(ListSelectionEvent e)
Called whenever the value of the selection changes. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final String ACTION_CATEGORIED_VIEW
public final String ACTION_ALPHEBETIC_VIEW
public final String ACTION_TOGGLE_DESCRIPTION
public final String ACTION_EXPAND
public final String ACTION_COLLAPSE
protected JLabel _nameLabel
protected JComponent _descriptionPanel
public static final int BUTTONS_SORT
public static final int BUTTONS_DESCRIPTION
public static final int BUTTONS_EXPAND_COLLAPSE
public static final int BUTTONS_ALL
Constructor Detail |
---|
public PropertyPane()
public PropertyPane(PropertyTable table)
PropertyPane
using PropertyTable.
table
- PropertyTable to be used in this PropertyPanepublic PropertyPane(PropertyTable table, int visibleButtons)
PropertyPane
using PropertyTable and specify which buttons are visible.
table
- PropertyTable to be used in this PropertyPanevisibleButtons
- visible buttons. The value is a bitwise OR of BUTTONS_SORT, BUTTONS_DESCRIPTION and
BUTTONS_EXPAND_COLLAPSE.Method Detail |
---|
protected Component createPropertyTablePanel(PropertyTable table)
table
- the property table.
public JScrollPane getScrollPane()
PropertyTable
.
PropertyTable
.public void setViewportBackground(Color color)
color
- the new viewport background colorprotected JComponent createToolBar()
PropertyTable
.
protected JComponent createToolBarComponent()
protected JideButton createButton(Action action)
public Action getAction(String action)
action
- the name of action
protected JComponent createDescriptionPanel()
updateDescription(String,String)
to update the new value of name and description to the
components you created.
protected JComponent createDescriptionArea()
protected void updateDescription(String name, String description)
createDescriptionPanel()
to
create your own name and description, you will have to override this method to set the new name and description
to your components.
name
- the name of the description paneldescription
- the description of the description panelprotected void resetDescription()
protected JPanel createDescriptionPanel(JComponent nameLabel, JComponent descriptionArea)
JPanel panel = new JPanel(new BorderLayout(0, 0));
panel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createLineBorder(getBorderColor()),
BorderFactory.createEmptyBorder(1, 1, 1, 1)));
panel.add(nameLabel, BorderLayout.BEFORE_FIRST_LINE);
panel.add(descriptionArea, BorderLayout.CENTER);
return panel;
nameLabel
- the name componentdescriptionArea
- the description area component
public void valueChanged(ListSelectionEvent e)
valueChanged
in interface ListSelectionListener
e
- the event that characterizes the change.public Color getBorderColor()
public void setBorderColor(Color borderColor)
borderColor
- the color of the borderpublic JComponent getToolBar()
public boolean isShowToolBar()
public void setShowToolBar(boolean showToolBar)
showToolBar
- true to show toolbar and false to hide toolbar.public boolean isShowDescription()
public void setShowDescription(boolean showDescription)
showDescription
- true to show description area and false to hide description area.public void setFont(Font font)
setFont
in class JComponent
font
- new font to be used by this panepublic PropertyTable getPropertyTable()
public int getOrder()
setOrder(int)
on PropertyPane to
change the order of underlying PropertyTableModel.
public void setOrder(int order)
order
- the orderprotected ImageIcon getImageIcon(String name)
GridIconsFactory
to get the
image icons.
Subclass can override this method to provide their own icon. The the value of the name parameter will be
constants defined in GridIconsFactory.PropertyPane
. For example, GridIconsFactory.PropertyPane.SORT is
for the sort icon.
name
- the name
protected String getResourceString(String key)
key
- the key
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |