Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.udo.cs.miningmart.gui.stepsettings
Class ParameterEditor

    java.lang.Object
      javax.swing.AbstractCellEditor
          javax.swing.DefaultCellEditor
              edu.udo.cs.miningmart.gui.stepsettings.ParameterEditor

All Implemented Interfaces:
  javax.swing.CellEditor, java.io.Serializable, javax.swing.table.TableCellEditor, javax.swing.table.TableCellRenderer, javax.swing.tree.TreeCellEditor

Direct Known Subclasses:
  OutputEditor, SelectEditor, SingleOneOfValueEditor, SingleValueEditor

public class ParameterEditor
extends javax.swing.DefaultCellEditor
implements javax.swing.table.TableCellRenderer

This is an editor for one parameter in the `StepParameterTable`.

Version:
  $Id: ParameterEditor.java,v 1.7 2006/04/11 14:10:13 euler Exp $
Author:
  Daniel Hakenjos
See Also:
  Serialized Form

Nested Class Summary

Nested classes inherited from class javax.swing.DefaultCellEditor
`javax.swing.DefaultCellEditor.EditorDelegate`

Field Summary
`protected MiningMartApplication` | `app`
`protected boolean` | `editable`
`protected int` | `loopnumber`
`protected int` | `numberofloops`
`protected java.util.Vector` | `oldparamcollections`
`protected OpParam` | `opParam`
`protected java.util.Vector` | `paramcollections`
`protected Step` | `step`

Fields inherited from class javax.swing.DefaultCellEditor
`clickCountToStart, delegate, editorComponent`

Fields inherited from class javax.swing.AbstractCellEditor
`changeEvent, listenerList`

Constructor Summary
`ParameterEditor()` Default Constructor for editing a `JTextField`.
`ParameterEditor(MiningMartApplication app, Step step, OpParam opParam)` Constructs new `ParameterEditor` with a `JTextField`.

Method Summary
`void` | `addChangeListener(javax.swing.event.ChangeListener listener)` Adds the `ChangeListener`.
`void` | `cancelEditing()` The values before editing will be displayed.
`boolean` | `existsOutput()` Checks wether the output exists or not.
`void` | `fireStateChanged()` Informs all `ChangeListener` that changed occurred.
`java.util.Collection` | `getAllParameterCollections()` Gets a `Collection` with `Collection`s for each loopnumber.
`javax.swing.event.ChangeListener` | `getChangeListener(int index)` Gets the `ChangeListener` by its index.
`int` | `getChangeListenerCount()` Gets the number of `ChangeListener`.
`int` | `getLoopNumber()` Gets the current loopnumber.
`int` | `getNumberOfLoops()` Gets the number of loops of the `Step`.
`java.util.Collection` | `getParameterCollection()` Gets the `Collection` for the current loopnumber.
`java.util.Collection` | `getParameterCollection(int loopnumber)` Gets the `Collection` of the Parameter for the specified loopnumber.
`java.awt.Component` | `getTableCellRendererComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, boolean hasFocus, int row, int column)` Gets the `editorComponent`.
`OpParam` | `getTheOpParam()` Gets the `OpParam`.
`void` | `init()` Inits this editor for the current loopnumber.
`void` | `makeOutput(boolean inputchanged, boolean outputchanged, boolean loopcountlower, boolean loopcounthigher)` Creates,updates and/or renames the output of the parameter.
`void` | `removeAllChangeListener()` Removes all `ChangeListener`.
`void` | `removeChangeListener(javax.swing.event.ChangeListener listener)` Removes the `ChangeListener`.
`void` | `setCollectionsInStep()` Saves the `Collection`s in the `Step`.
`void` | `setEditable()` Sets the editable-flag.
`void` | `setLoopNumber(int loopnumber)` Sets the loopnumber.
`void` | `setNumberOfLoops(int numberofloops)` Sets the number of the loops.
`void` | `setParameterCollection(java.util.Collection collection)` Sets the `Collection` of the Parameter for the current loopnumber.
`void` | `setParameterCollection(java.util.Collection collection, int loopnumber)` Sets the `Collection` of the Parameter for the specified loppnumber.

Methods inherited from class javax.swing.DefaultCellEditor
`cancelCellEditing, getCellEditorValue, getClickCountToStart, getComponent, getTableCellEditorComponent, getTreeCellEditorComponent, isCellEditable, setClickCountToStart, shouldSelectCell, stopCellEditing`

Methods inherited from class javax.swing.AbstractCellEditor
`addCellEditorListener, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, removeCellEditorListener`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface javax.swing.CellEditor
`addCellEditorListener, removeCellEditorListener`

Field Detail

### app

    protected MiningMartApplication app

### step

    protected Step step

### opParam

    protected OpParam opParam

### numberofloops

    protected int numberofloops

### loopnumber

    protected int loopnumber

### paramcollections

    protected java.util.Vector paramcollections

### oldparamcollections

    protected java.util.Vector oldparamcollections

### editable

    protected boolean editable

Constructor Detail

### ParameterEditor

    public ParameterEditor()

  Default Constructor for editing a `JTextField`.

### ParameterEditor

    public ParameterEditor(MiningMartApplication app,
                           Step step,
                           OpParam opParam)

  Constructs new `ParameterEditor` with a `JTextField`.

Method Detail

### init

    public void init()

  Inits this editor for the current loopnumber. This method is useful in subclasses to set the text or list.

### getNumberOfLoops

    public int getNumberOfLoops()

  Gets the number of loops of the `Step`.

### getLoopNumber

    public int getLoopNumber()

  Gets the current loopnumber.

### setLoopNumber

    public void setLoopNumber(int loopnumber)

  Sets the loopnumber.

### setNumberOfLoops

    public void setNumberOfLoops(int numberofloops)

  Sets the number of the loops.

### getParameterCollection

    public java.util.Collection getParameterCollection(int loopnumber)

  Gets the `Collection` of the Parameter for the specified loopnumber.

### getParameterCollection

    public java.util.Collection getParameterCollection()

  Gets the `Collection` for the current loopnumber.

### setParameterCollection

    public void setParameterCollection(java.util.Collection collection,
                                       int loopnumber)

  Sets the `Collection` of the Parameter for the specified loppnumber.

### setParameterCollection

    public void setParameterCollection(java.util.Collection collection)

  Sets the `Collection` of the Parameter for the current loopnumber.

### getAllParameterCollections

    public java.util.Collection getAllParameterCollections()

  Gets a `Collection` with `Collection`s for each loopnumber.

### getTableCellRendererComponent

    public java.awt.Component getTableCellRendererComponent(javax.swing.JTable table,
                                                            java.lang.Object value,
                                                            boolean isSelected,
                                                            boolean hasFocus,
                                                            int row,
                                                            int column)

  Gets the `editorComponent`.

  Specified by:
    `getTableCellRendererComponent` in interface `javax.swing.table.TableCellRenderer`
  See Also:
    `TableCellRenderer.getTableCellRendererComponent(JTable, Object, boolean, boolean, int, int)`

### setCollectionsInStep

    public void setCollectionsInStep()
                              throws M4Exception

  Saves the `Collection`s in the `Step`. Only input-parameters.

  Throws:
    `M4Exception`
  See Also:
    `Step.setParameter(OpParam,Collection,int)`

### existsOutput

    public boolean existsOutput()

  Checks wether the output exists or not. If it is an input parameter then it returns false. Otherwise if all `Collection`s of the old Parameters are null or empty then the ouput doesn't exists.

### makeOutput

    public void makeOutput(boolean inputchanged,
                           boolean outputchanged,
                           boolean loopcountlower,
                           boolean loopcounthigher)
                    throws M4Exception

  Creates,updates and/or renames the output of the parameter.

  Throws:
    `M4Exception`

### addChangeListener

    public void addChangeListener(javax.swing.event.ChangeListener listener)

  Adds the `ChangeListener`.

### removeChangeListener

    public void removeChangeListener(javax.swing.event.ChangeListener listener)

  Removes the `ChangeListener`.

### removeAllChangeListener

    public void removeAllChangeListener()

  Removes all `ChangeListener`.

### getChangeListenerCount

    public int getChangeListenerCount()

  Gets the number of `ChangeListener`.

### getChangeListener

    public javax.swing.event.ChangeListener getChangeListener(int index)

  Gets the `ChangeListener` by its index.

### fireStateChanged

    public void fireStateChanged()

  Informs all `ChangeListener` that changed occurred.

### getTheOpParam

    public OpParam getTheOpParam()

  Gets the `OpParam`.

### cancelEditing

    public void cancelEditing()
                       throws M4Exception

  The values before editing will be displayed. They are also set to the step.

  Throws:
    `M4Exception`
  See Also:
    `Step.setParameter(OpParam,Collection,int)`

### setEditable

    public void setEditable()

  Sets the editable-flag.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005