|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTable
org.openpermis.editor.policy.gui.checklist.CheckList<T>
T
- type of the items in the check list.public class CheckList<T>
Editor for two observable lists.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JTable |
---|
JTable.AccessibleJTable, JTable.PrintMode |
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.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
private Action |
doubleClickAction
The action to trigger on a double click. |
private static int |
FIRST_ROW_SPACING
Additional spacing for the first row. |
private TableCellRenderer |
itemRenderer
The item renderer for this checklist. |
private static int |
MIN_COLUMN_WIDTH
Minimum column width for empty columns. |
private static long |
serialVersionUID
|
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 | |
---|---|
CheckList()
Creates a new unbound check list. |
|
CheckList(org.jdesktop.observablecollections.ObservableList<T> pool,
org.jdesktop.observablecollections.ObservableList<T> selection)
Creates a new checklist for the specified pool and selection list. |
Method Summary | |
---|---|
private void |
addModelListeners()
Adds listeners to the model that should be removed if the list disappears. |
void |
ancestorAdded(AncestorEvent event)
|
void |
ancestorMoved(AncestorEvent event)
|
void |
ancestorRemoved(AncestorEvent event)
|
void |
bind(org.jdesktop.observablecollections.ObservableList<T> pool,
org.jdesktop.observablecollections.ObservableList<T> selection)
Binds the check list to the specified pool and selection list. |
void |
componentHidden(ComponentEvent e)
|
void |
componentMoved(ComponentEvent e)
|
void |
componentResized(ComponentEvent e)
|
void |
componentShown(ComponentEvent e)
|
protected void |
configureEnclosingScrollPane()
Disables the header view of this table. |
void |
doLayout()
|
boolean |
editCellAt(int row,
int column,
EventObject e)
|
T |
getActivePart()
|
TableCellRenderer |
getCellRenderer(int row,
int column)
|
private int |
getColumnWidth(int column)
Calculates the maximum width of the specified column. |
CheckListModel<T> |
getModel()
|
private int |
getViewportWidth()
Returns the view of the enclosing viewport or the width of this table. |
private void |
layoutColumns()
Modifies the column widths according to the data in the table. |
private void |
removeModelListeners()
Removes listeners that should only be active while the list is visible. |
void |
scrollRectToVisible(Rectangle rect)
|
void |
setDoubleClickAction(Action action)
Sets the action to be executed if a double click is performed on a non-check column. |
void |
setItemRenderer(TableCellRenderer itemRenderer)
Sets the renderer to be used for check list items. |
void |
setModel(TableModel dataModel)
|
void |
setVisibleRowCount(int rows)
Sets the number of visible rows that the list shows by preference. |
private void |
toggle(int row)
Toggles the selection state of the specified row. |
protected void |
unconfigureEnclosingScrollPane()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
-4074036755955844894L
private static final int FIRST_ROW_SPACING
8
private static final int MIN_COLUMN_WIDTH
16
private Action doubleClickAction
private TableCellRenderer itemRenderer
Constructor Detail |
---|
public CheckList()
bind(ObservableList, ObservableList)
public CheckList(org.jdesktop.observablecollections.ObservableList<T> pool, org.jdesktop.observablecollections.ObservableList<T> selection)
pool
- the available list items shown.selection
- the list of selected items from the pool.Method Detail |
---|
public void setItemRenderer(TableCellRenderer itemRenderer)
itemRenderer
- the item renderer.public void setDoubleClickAction(Action action)
action
- the action to be executed.public void bind(org.jdesktop.observablecollections.ObservableList<T> pool, org.jdesktop.observablecollections.ObservableList<T> selection)
pool
- the available list items shown.selection
- the list of selected items from the pool.public void setVisibleRowCount(int rows)
rows
- the number of rows requested.private void addModelListeners()
private void removeModelListeners()
private int getColumnWidth(int column)
column
- the column for which to determine the maximum width.
private int getViewportWidth()
private void layoutColumns()
public T getActivePart()
private void toggle(int row)
Toggling occurs at the end of all actions that are currently on the dispatch queue.
row
- the row to toggle.public void setModel(TableModel dataModel)
setModel
in class JTable
public CheckListModel<T> getModel()
getModel
in class JTable
public TableCellRenderer getCellRenderer(int row, int column)
getCellRenderer
in class JTable
public void doLayout()
doLayout
in class JTable
public boolean editCellAt(int row, int column, EventObject e)
editCellAt
in class JTable
protected void configureEnclosingScrollPane()
configureEnclosingScrollPane
in class JTable
protected void unconfigureEnclosingScrollPane()
unconfigureEnclosingScrollPane
in class JTable
public void scrollRectToVisible(Rectangle rect)
scrollRectToVisible
in class JComponent
public void ancestorAdded(AncestorEvent event)
ancestorAdded
in interface AncestorListener
public void ancestorMoved(AncestorEvent event)
ancestorMoved
in interface AncestorListener
public void ancestorRemoved(AncestorEvent event)
ancestorRemoved
in interface AncestorListener
public void componentHidden(ComponentEvent e)
componentHidden
in interface ComponentListener
public void componentMoved(ComponentEvent e)
componentMoved
in interface ComponentListener
public void componentResized(ComponentEvent e)
componentResized
in interface ComponentListener
public void componentShown(ComponentEvent e)
componentShown
in interface ComponentListener
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
PERMIS Role Based Access Control 0.3.0 (Build 14)
2009/05/08 09:06:48
Copyright (c) 2002-2007 Ergon Informatik AG