|
|||||||||||
| 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
|
+--org.objectweb.jac.aspects.gui.swing.AbstractView
|
+--org.objectweb.jac.aspects.gui.swing.AbstractCollection
Base class to implement ListView and TableView
| Field Summary | |
protected CollectionItemView |
itemView
|
| Fields inherited from class org.objectweb.jac.aspects.gui.swing.AbstractView |
closed |
| 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 | |
AbstractCollection(ViewFactory factory,
DisplayContext context,
CollectionItem collection,
Object substance,
CollectionModel model,
CollectionItemView itemView)
|
|
| Method Summary | |
void |
actionPerformed(ActionEvent event)
Handles the actions on this view. |
void |
close(boolean validate)
Close this view. |
protected JButton |
createButton(String icon,
String tooltip,
String action)
|
CollectionModel |
getCollectionModel()
Gets the associated collection model. |
protected abstract CollectionUpdate |
getCollectionUpdate()
|
FieldItem |
getField()
|
protected abstract JComponent |
getInnerComponent(Model model)
|
protected Object[] |
getSelected()
Returns an array of the selected objects. |
protected abstract int[] |
getSelectedIndices()
Returns the indices of selected objects. |
protected abstract ListSelectionModel |
getSelectionModel()
|
Object |
getSubstance()
Gets the substance object holding the field |
boolean |
isEditor()
Tells wether the view allows to edit the collection (i.e it has add/remove buttons) |
void |
keyPressed(KeyEvent event)
|
void |
keyReleased(KeyEvent event)
|
void |
keyTyped(KeyEvent event)
|
void |
mouseClicked(MouseEvent me)
|
void |
mouseEntered(MouseEvent me)
|
void |
mouseExited(MouseEvent me)
|
void |
mousePressed(MouseEvent e)
|
void |
mouseReleased(MouseEvent e)
|
protected abstract void |
onRemove()
|
void |
setAutoUpdate(boolean autoUpdate)
Sets the auto-update property of the view. |
void |
setEditor(boolean isEditor)
Set the "editability" of the view. |
void |
setField(FieldItem field)
Sets the field being displayed |
protected void |
setNoRefresh(boolean norefresh)
|
void |
setSubstance(Object substance)
Sets the substance object holding the field |
void |
setValue(Object value)
Sets the value to display |
void |
updateModel(Object substance)
Updates the collection model |
void |
valueChanged(ListSelectionEvent event)
Defines what happens when the selection changes. |
| Methods inherited from class org.objectweb.jac.aspects.gui.swing.AbstractView |
equalsView, equalsView, getContext, getDescription, getFactory, getLabel, getMessage, getParameters, getParentView, getRootView, getStyle, getType, getViewBorder, invokeInContext, isClosed, isDescendantOf, setContext, setDescription, setFactory, setFocus, setHeight, setLabel, setMessage, setParameters, setParentView, setStyle, setType, setViewBorder, setWidth, toString |
| 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 |
| Methods inherited from interface org.objectweb.jac.aspects.gui.CollectionView |
setSelected |
| Methods inherited from interface org.objectweb.jac.aspects.gui.View |
getContext, getDescription, getFactory, getLabel, getMessage, getParentView, getRootView, getStyle, getViewBorder, isClosed, isDescendantOf, setContext, setDescription, setFactory, setFocus, setHeight, setLabel, setMessage, setParentView, setStyle, setViewBorder, setWidth |
| Methods inherited from interface org.objectweb.jac.aspects.gui.ViewIdentity |
equalsView, equalsView, getParameters, getType, setParameters, setType |
| Field Detail |
protected CollectionItemView itemView
| Constructor Detail |
public AbstractCollection(ViewFactory factory,
DisplayContext context,
CollectionItem collection,
Object substance,
CollectionModel model,
CollectionItemView itemView)
| Method Detail |
public CollectionModel getCollectionModel()
CollectionView
getCollectionModel in interface CollectionView
protected JButton createButton(String icon,
String tooltip,
String action)
protected abstract JComponent getInnerComponent(Model model)
public boolean isEditor()
CollectionView
isEditor in interface CollectionViewCollectionView.setEditor(boolean)public void setEditor(boolean isEditor)
CollectionView
setEditor in interface CollectionViewCollectionView.isEditor()public void setAutoUpdate(boolean autoUpdate)
FieldView
setAutoUpdate in interface FieldViewpublic void close(boolean validate)
View
close in interface Viewclose in class AbstractViewpublic void valueChanged(ListSelectionEvent event)
valueChanged in interface ListSelectionListenerpublic void keyTyped(KeyEvent event)
keyTyped in interface KeyListenerpublic void keyPressed(KeyEvent event)
keyPressed in interface KeyListenerpublic void keyReleased(KeyEvent event)
keyReleased in interface KeyListenerpublic void actionPerformed(ActionEvent event)
On a collection view, the three default possible actions are to open a new view on the selected item, to add a new item to the collection, and to remove the selected item from the collection.
actionPerformed in interface ActionListenerevent - the user eventprotected abstract void onRemove()
protected abstract CollectionUpdate getCollectionUpdate()
protected Object[] getSelected()
protected abstract int[] getSelectedIndices()
protected abstract ListSelectionModel getSelectionModel()
protected void setNoRefresh(boolean norefresh)
public void mouseClicked(MouseEvent me)
mouseClicked in interface MouseListenerpublic void mousePressed(MouseEvent e)
mousePressed in interface MouseListenerpublic void mouseReleased(MouseEvent e)
mouseReleased in interface MouseListenerpublic void mouseExited(MouseEvent me)
mouseExited in interface MouseListenerpublic void mouseEntered(MouseEvent me)
mouseEntered in interface MouseListenerpublic void setField(FieldItem field)
FieldView
setField in interface FieldViewfield - the fieldpublic void setSubstance(Object substance)
FieldView
setSubstance in interface FieldViewsubstance - the substanceFieldView.getSubstance()public Object getSubstance()
FieldView
getSubstance in interface FieldViewFieldView.setSubstance(Object)public FieldItem getField()
getField in interface FieldViewpublic void setValue(Object value)
FieldView
setValue in interface FieldViewvalue - the valuepublic void updateModel(Object substance)
CollectionView
updateModel in interface CollectionView
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||