|
JAC project AOPSYS CEDRIC & LIP6 labs |
|||||||||
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 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()
Close this view. |
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. |
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 |
getContext, getDescription, getFactory, getLabel, getMessage, getParameters, getParentView, getRootView, getStyle, getType, getViewBorder, 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, validate |
Methods inherited from interface org.objectweb.jac.aspects.gui.ViewIdentity |
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 abstract JComponent getInnerComponent(Model model)
public boolean isEditor()
CollectionView
isEditor
in interface CollectionView
CollectionView.setEditor(boolean)
public void setEditor(boolean isEditor)
CollectionView
setEditor
in interface CollectionView
CollectionView.isEditor()
public void setAutoUpdate(boolean autoUpdate)
FieldView
setAutoUpdate
in interface FieldView
public void close()
View
close
in interface View
close
in class AbstractView
public void valueChanged(ListSelectionEvent event)
valueChanged
in interface ListSelectionListener
public void keyTyped(KeyEvent event)
keyTyped
in interface KeyListener
public void keyPressed(KeyEvent event)
keyPressed
in interface KeyListener
public void keyReleased(KeyEvent event)
keyReleased
in interface KeyListener
public 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 ActionListener
protected abstract void onRemove()
protected abstract CollectionUpdate getCollectionUpdate()
protected Object[] getSelected()
protected abstract int[] getSelectedIndices()
protected void setNoRefresh(boolean norefresh)
public void mouseClicked(MouseEvent me)
mouseClicked
in interface MouseListener
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
public void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
public void mouseExited(MouseEvent me)
mouseExited
in interface MouseListener
public void mouseEntered(MouseEvent me)
mouseEntered
in interface MouseListener
public void setField(FieldItem field)
FieldView
setField
in interface FieldView
field
- the fieldpublic void setSubstance(Object substance)
FieldView
setSubstance
in interface FieldView
substance
- the substancepublic FieldItem getField()
getField
in interface FieldView
public void setValue(Object value)
FieldView
setValue
in interface FieldView
value
- the valuepublic void updateModel(Object substance)
CollectionView
updateModel
in interface CollectionView
|
Contact JAC development team: Renaud Pawlak Lionel Seinturier Laurent Martelli |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |