org.progeeks.meta.swing.editor
Class ContainerEditor

java.lang.Object
  extended by org.progeeks.meta.swing.AbstractPropertyUI
      extended by org.progeeks.meta.swing.AbstractPropertyEditor
          extended by org.progeeks.meta.swing.editor.ContainerEditor
All Implemented Interfaces:
MetaPropertyEditor, MetaPropertyRenderer, MetaPropertyUI

public class ContainerEditor
extends AbstractPropertyEditor
implements MetaPropertyRenderer

An editor implementation for a Collection of values otherwise editable with another registered editor.

Version:
$Revision: 1.8 $
Author:
Paul Speed

Constructor Summary
ContainerEditor()
           
 
Method Summary
protected  void addItem()
           
 void editItem(int i)
           
 java.awt.Component getUIComponent()
          Returns the component that allows modification of the associated property mutator.
 boolean hasAddButton()
          Returns true if the dialog should have an add button if the property mutator supports it.
 boolean hasEditButton()
          Returns true if the dialog should have an edit button if the property mutator supports it.
 boolean hasRemoveButton()
          Returns true if the dialog should have a remove button if the property mutator supports it.
 void initializeView(MetaPropertyContext viewContext)
          Initializes this MetaPropertyUI as a participant in the specified MetaPropertyContext's hierarchy.
 boolean isSingleColumn()
          Returns false since lists should be full-width controls.
protected  void propertyChanged(java.beans.PropertyChangeEvent event)
          Called when the value contained in the mutator changes.
protected  void releaseComponent()
          Implemented by subclasses to release any component-related resources.
protected  void removeItem(int i, java.lang.Object value)
           
protected  void resetComponentValue()
          Called to set the component value to a default state.
protected  void setComponentValue(java.lang.Object value)
          Called to set the current value displayed in the component.
 void setPropertyMutator(PropertyMutator mutator)
          Intercepted to configure the list panel to most appropriately modify the list.
 
Methods inherited from class org.progeeks.meta.swing.AbstractPropertyEditor
flushEdits
 
Methods inherited from class org.progeeks.meta.swing.AbstractPropertyUI
getPropertyMutator, getViewContext, isLabeled, release, setPropertyValue, setupToolTipText, terminateView
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.progeeks.meta.swing.MetaPropertyUI
getViewContext, isLabeled, release
 

Constructor Detail

ContainerEditor

public ContainerEditor()
Method Detail

initializeView

public void initializeView(MetaPropertyContext viewContext)
Description copied from class: AbstractPropertyUI
Initializes this MetaPropertyUI as a participant in the specified MetaPropertyContext's hierarchy. The default implementation just sets the internal MetaPropertyContext reference. Subclasses should rememeber to call the super.initializeView() method.

Specified by:
initializeView in interface MetaPropertyUI
Overrides:
initializeView in class AbstractPropertyUI

hasEditButton

public boolean hasEditButton()
Returns true if the dialog should have an edit button if the property mutator supports it. This allows subclasses to specifically override.


hasRemoveButton

public boolean hasRemoveButton()
Returns true if the dialog should have a remove button if the property mutator supports it. This allows subclasses to specifically override.


hasAddButton

public boolean hasAddButton()
Returns true if the dialog should have an add button if the property mutator supports it. This allows subclasses to specifically override.


setPropertyMutator

public void setPropertyMutator(PropertyMutator mutator)
Intercepted to configure the list panel to most appropriately modify the list.

Specified by:
setPropertyMutator in interface MetaPropertyUI
Overrides:
setPropertyMutator in class AbstractPropertyUI

isSingleColumn

public boolean isSingleColumn()
Returns false since lists should be full-width controls.

Specified by:
isSingleColumn in interface MetaPropertyUI
Overrides:
isSingleColumn in class AbstractPropertyUI

getUIComponent

public java.awt.Component getUIComponent()
Returns the component that allows modification of the associated property mutator.

Specified by:
getUIComponent in interface MetaPropertyUI
Specified by:
getUIComponent in class AbstractPropertyUI

releaseComponent

protected void releaseComponent()
Implemented by subclasses to release any component-related resources.

Specified by:
releaseComponent in class AbstractPropertyEditor

setComponentValue

protected void setComponentValue(java.lang.Object value)
Called to set the current value displayed in the component.

Specified by:
setComponentValue in class AbstractPropertyUI

resetComponentValue

protected void resetComponentValue()
Called to set the component value to a default state. The default implementation calls setComponentValue(null).

Overrides:
resetComponentValue in class AbstractPropertyUI

propertyChanged

protected void propertyChanged(java.beans.PropertyChangeEvent event)
Called when the value contained in the mutator changes. The default implementation ignores property changes if the value is the same as the current cached value either by reference or by .equals().

Overrides:
propertyChanged in class AbstractPropertyUI

addItem

protected void addItem()

editItem

public void editItem(int i)

removeItem

protected void removeItem(int i,
                          java.lang.Object value)


Copyright © 2002-2003 Paul Speed. All Rights Reserved.