de.fhg.igd.semoa.envision.plugins
Class PolicyConditionPanel.ConditionList

java.lang.Object
  extended byde.fhg.igd.semoa.envision.plugins.PolicyConditionPanel.ConditionList
All Implemented Interfaces:
EventListener, ListSelectionListener, MouseListener, TableModelListener
Enclosing class:
PolicyConditionPanel

protected class PolicyConditionPanel.ConditionList
extends Object
implements TableModelListener, MouseListener, ListSelectionListener

This class generates the table with the names of the condition.


Field Summary
(package private)  String editedName_
          The last name that is edited or has been edited.
(package private)  Vector list_
          The vector with all the names which are contained in the table.
(package private)  DefaultTableModel model_
          The model of the table
(package private)  ListSelectionModel rowSelection_
           
(package private)  JTable table_
          The generated table.
 
Constructor Summary
PolicyConditionPanel.ConditionList(Map conds)
          Class Constructor which specified the map from which the names list is generated.
 
Method Summary
 void add(String name)
          Adds a new row in the table.
 Vector getDataVector()
           
 String getSelectedValue()
          Returns the value of the selected row in a string.
 JTable getTable()
          Returns the generated names' table.
 boolean isEditing()
          Checks if the user is editing some value in the table.
 void mouseClicked(MouseEvent e)
           
 void mouseEntered(MouseEvent e)
           
 void mouseExited(MouseEvent e)
           
 void mousePressed(MouseEvent e)
           
 void mouseReleased(MouseEvent e)
           
 void remove(int row)
          Removes the row at the specified index.
 void setEditedValue(String s)
          Sets the old value of the row that has been editited at the moment when the "Rename" button is clicked.
 void stopEditing()
          Stops the editing of the table.
 void tableChanged(TableModelEvent e)
           
 void valueChanged(ListSelectionEvent e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rowSelection_

ListSelectionModel rowSelection_

model_

DefaultTableModel model_
The model of the table


editedName_

String editedName_
The last name that is edited or has been edited. It is saved in order to cancel the changes when they are invalid.

It is set either by the mouseClicked() or by the setEditedValue() when the "Rename" button is clicked.


list_

Vector list_
The vector with all the names which are contained in the table.


table_

JTable table_
The generated table.

Constructor Detail

PolicyConditionPanel.ConditionList

public PolicyConditionPanel.ConditionList(Map conds)
Class Constructor which specified the map from which the names list is generated.

Parameters:
conds - the map of the conditions
Method Detail

add

public void add(String name)
Adds a new row in the table.

Parameters:
name - the value of the row which must be added

remove

public void remove(int row)
Removes the row at the specified index.

Parameters:
row - the index of the row which must be removed

getSelectedValue

public String getSelectedValue()
Returns the value of the selected row in a string.

Returns:
the value of the selected row in a string

getTable

public JTable getTable()
Returns the generated names' table.

Returns:
the generated table.

getDataVector

public Vector getDataVector()
Returns:
the values from the table as a Vector

setEditedValue

public void setEditedValue(String s)
Sets the old value of the row that has been editited at the moment when the "Rename" button is clicked.

Parameters:
s - the old value of the row that has been edited

isEditing

public boolean isEditing()
Checks if the user is editing some value in the table.

Returns:
true - if the user is editing the table false - if the user is not editing the table

stopEditing

public void stopEditing()
Stops the editing of the table.


tableChanged

public void tableChanged(TableModelEvent e)
Specified by:
tableChanged in interface TableModelListener
See Also:
TableModelListener.tableChanged(TableModelEvent)

mouseClicked

public void mouseClicked(MouseEvent e)
Specified by:
mouseClicked in interface MouseListener
See Also:
MouseListener.mouseClicked(MouseEvent)

mouseExited

public void mouseExited(MouseEvent e)
Specified by:
mouseExited in interface MouseListener
See Also:
MouseListener.mouseExited(MouseEvent)

mouseEntered

public void mouseEntered(MouseEvent e)
Specified by:
mouseEntered in interface MouseListener
See Also:
MouseListener.mouseEntered(MouseEvent)

mousePressed

public void mousePressed(MouseEvent e)
Specified by:
mousePressed in interface MouseListener
See Also:
MouseListener.mousePressed(MouseEvent)

mouseReleased

public void mouseReleased(MouseEvent e)
Specified by:
mouseReleased in interface MouseListener
See Also:
MouseListener.mouseReleased(MouseEvent)

valueChanged

public void valueChanged(ListSelectionEvent e)
Specified by:
valueChanged in interface ListSelectionListener
See Also:
javax.swing.event.ListSelectionListener#tableChanged(ListSelectionEvent)


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.