kaos.kpat.tabs
Class ActorInfoPanel

java.lang.Object
  extended by kaos.kpat.tabs.ActorInfoPanel
All Implemented Interfaces:
DomainListener, PolicyListener
Direct Known Subclasses:
ActorClassTab, DomainViewTab

public class ActorInfoPanel
extends java.lang.Object
implements PolicyListener, DomainListener


Nested Class Summary
 class ActorInfoPanel.AgentPropsTableCellRenderer
          Table Cell Renderer for displaying a small font and tip text for each agent property.
 class ActorInfoPanel.NewPropsTableCellEditor
           
 class ActorInfoPanel.OntTypesListCellRenderer
           
 class ActorInfoPanel.PropsTableCellEditor
           
 
Field Summary
protected  javax.swing.JButton _addPolicyBtn
           
protected  javax.swing.JButton _addPropButton
           
protected  javax.swing.JTable _agentPropsTable
           
protected  kaos.kpat.tabs.ActorInfoPanel.AgentPropsTableModel _agentPropsTableModel
           
protected  javax.swing.JButton _duplicatePolicyBtn
           
protected  javax.swing.JButton _editPolicyBtn
           
protected static java.awt.Frame _frame
           
protected  javax.swing.JPanel _generalInfoPanel
           
protected  boolean _isDataProperty
           
protected  KPATApplet _kpat
           
protected  javax.swing.JButton _loadPolicyBtn
           
protected  Logger _logger
           
protected  PolicyListTableModel _model
           
protected  boolean _okButtonPressed
           
protected  javax.swing.JLabel _ontLabel
           
protected  javax.swing.JList _ontTypeList
           
protected  javax.swing.DefaultListModel _ontTypeListModel
           
protected  javax.swing.JPanel _policiesPanel
           
protected  javax.swing.JTextArea _policyDescArea
           
protected  javax.swing.JLabel _policyDescLbl
           
protected  javax.swing.JTable _policyTable
           
protected  javax.swing.JLabel _propertyLabel
           
protected  java.util.Hashtable _propHashtable
           
protected  javax.swing.DefaultListModel _propListModel
           
protected  java.util.Hashtable<java.lang.String,java.lang.String> _propNameMap
           
protected  javax.swing.JList _propsList
           
protected  javax.swing.table.TableCellEditor _propsTableCellEditor
           
protected  javax.swing.JButton _removePolicyBtn
           
protected  javax.swing.JButton _removePropButton
           
protected  javax.swing.JButton _savePolicyBtn
           
protected  TunnelClient _tunnelClient
           
static int CANCEL_SELECTED
           
protected  SortableTreeNode currentNode_
           
protected  ModelPolicy currentPolicy_
           
protected  ModelPolicyList currentPolicyList_
           
protected  javax.swing.JLabel labelData0_
           
protected  javax.swing.JLabel labelData1_
           
protected  javax.swing.JLabel labelData2_
           
protected  javax.swing.JLabel labelData3_
           
protected  javax.swing.JLabel labelPolicyInfo_
           
protected  javax.swing.JLabel labelTitle2_
           
protected  javax.swing.JLabel labelTitle3_
           
static int OK_SELECTED
           
protected static int POLICY_TABLE_COLUMN_AUTHOR
           
protected static int POLICY_TABLE_COLUMN_CONTROL_ACTION
           
protected static int POLICY_TABLE_COLUMN_INFORCE
           
protected static int POLICY_TABLE_COLUMN_POLICY
           
protected static int POLICY_TABLE_COLUMN_PRIORITY
           
protected static int POLICY_TABLE_COLUMN_WIDTH_AUTHOR
           
protected static int POLICY_TABLE_COLUMN_WIDTH_CONTROL_ACTION
           
protected static int POLICY_TABLE_COLUMN_WIDTH_INFORCE
           
protected static int POLICY_TABLE_COLUMN_WIDTH_POLICY
           
protected static int POLICY_TABLE_COLUMN_WIDTH_PRIORITY
           
protected  int selectedRow_
           
 
Constructor Summary
ActorInfoPanel()
          Creates a new instance of PolicyTemplatesTab
 
Method Summary
 javax.swing.JPanel buildActorInfoPanel()
           
protected  void enableGovernableControls(boolean newState)
          Set the enabled/disabled state of the policy-editing controls.
protected  java.lang.String getShortName(java.lang.String name)
           
 void initialize(KPATApplet kpat, TunnelClient tunnelClient)
           
 void modelObjectAdded(ModelObject modelObj)
           
 void modelObjectChanged(ModelObject modelObj)
           
 void modelObjectRemoved(ModelObject modelObj)
           
 void modelRefreshed(ModelDomainList rootDomains)
           
 void policiesRefreshed(ModelPolicyList mpl)
           
 void policyAdded(ModelPolicy mp)
           
 void policyChanged(ModelPolicy mp)
           
 void policyRemoved(ModelPolicy mp)
           
 void policyTableUpdate()
          Update the JTable of polices for the currently selected node.
 void policyTableUpdate(SortableTreeNode node)
          Update the JTable of polices for the node.
protected  void removeProperty()
           
 void setDlgLocation(javax.swing.JDialog dlg)
           
protected  void showException(java.lang.String msg, java.lang.Exception xcp)
           
protected  void showPropertiesDialog()
           
protected  void showPropertiesDialog(int row)
           
 void updateGeneralInfoFields(iModelObject o)
          Update the 'General Info' area (not the policy table) according to selected object.
 void updatePolicyPane(SortableTreeNode node)
          Update the policy pane with info for the specified object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

POLICY_TABLE_COLUMN_WIDTH_POLICY

protected static final int POLICY_TABLE_COLUMN_WIDTH_POLICY
See Also:
Constant Field Values

POLICY_TABLE_COLUMN_WIDTH_PRIORITY

protected static final int POLICY_TABLE_COLUMN_WIDTH_PRIORITY
See Also:
Constant Field Values

POLICY_TABLE_COLUMN_WIDTH_INFORCE

protected static final int POLICY_TABLE_COLUMN_WIDTH_INFORCE
See Also:
Constant Field Values

POLICY_TABLE_COLUMN_WIDTH_CONTROL_ACTION

protected static final int POLICY_TABLE_COLUMN_WIDTH_CONTROL_ACTION
See Also:
Constant Field Values

POLICY_TABLE_COLUMN_WIDTH_AUTHOR

protected static final int POLICY_TABLE_COLUMN_WIDTH_AUTHOR
See Also:
Constant Field Values

POLICY_TABLE_COLUMN_POLICY

protected static final int POLICY_TABLE_COLUMN_POLICY
See Also:
Constant Field Values

POLICY_TABLE_COLUMN_PRIORITY

protected static final int POLICY_TABLE_COLUMN_PRIORITY
See Also:
Constant Field Values

POLICY_TABLE_COLUMN_INFORCE

protected static final int POLICY_TABLE_COLUMN_INFORCE
See Also:
Constant Field Values

POLICY_TABLE_COLUMN_CONTROL_ACTION

protected static final int POLICY_TABLE_COLUMN_CONTROL_ACTION
See Also:
Constant Field Values

POLICY_TABLE_COLUMN_AUTHOR

protected static final int POLICY_TABLE_COLUMN_AUTHOR
See Also:
Constant Field Values

OK_SELECTED

public static final int OK_SELECTED
See Also:
Constant Field Values

CANCEL_SELECTED

public static final int CANCEL_SELECTED
See Also:
Constant Field Values

_okButtonPressed

protected boolean _okButtonPressed

_agentPropsTableModel

protected kaos.kpat.tabs.ActorInfoPanel.AgentPropsTableModel _agentPropsTableModel

_propertyLabel

protected javax.swing.JLabel _propertyLabel

_propsTableCellEditor

protected javax.swing.table.TableCellEditor _propsTableCellEditor

_propHashtable

protected java.util.Hashtable _propHashtable

_agentPropsTable

protected javax.swing.JTable _agentPropsTable

_isDataProperty

protected boolean _isDataProperty

_kpat

protected KPATApplet _kpat

_tunnelClient

protected TunnelClient _tunnelClient

_policiesPanel

protected javax.swing.JPanel _policiesPanel

_frame

protected static java.awt.Frame _frame

_policyTable

protected javax.swing.JTable _policyTable

labelPolicyInfo_

protected javax.swing.JLabel labelPolicyInfo_

labelData0_

protected javax.swing.JLabel labelData0_

labelData1_

protected javax.swing.JLabel labelData1_

labelTitle2_

protected javax.swing.JLabel labelTitle2_

labelData2_

protected javax.swing.JLabel labelData2_

labelTitle3_

protected javax.swing.JLabel labelTitle3_

labelData3_

protected javax.swing.JLabel labelData3_

_generalInfoPanel

protected javax.swing.JPanel _generalInfoPanel

_ontTypeList

protected javax.swing.JList _ontTypeList

_ontTypeListModel

protected javax.swing.DefaultListModel _ontTypeListModel

_propsList

protected javax.swing.JList _propsList

_propListModel

protected javax.swing.DefaultListModel _propListModel

_addPropButton

protected javax.swing.JButton _addPropButton

_removePropButton

protected javax.swing.JButton _removePropButton

_propNameMap

protected java.util.Hashtable<java.lang.String,java.lang.String> _propNameMap

_policyDescArea

protected javax.swing.JTextArea _policyDescArea

_ontLabel

protected javax.swing.JLabel _ontLabel

_addPolicyBtn

protected javax.swing.JButton _addPolicyBtn

_removePolicyBtn

protected javax.swing.JButton _removePolicyBtn

_duplicatePolicyBtn

protected javax.swing.JButton _duplicatePolicyBtn

_editPolicyBtn

protected javax.swing.JButton _editPolicyBtn

_savePolicyBtn

protected javax.swing.JButton _savePolicyBtn

_loadPolicyBtn

protected javax.swing.JButton _loadPolicyBtn

selectedRow_

protected int selectedRow_

_policyDescLbl

protected javax.swing.JLabel _policyDescLbl

currentPolicy_

protected ModelPolicy currentPolicy_

currentPolicyList_

protected ModelPolicyList currentPolicyList_

_model

protected PolicyListTableModel _model

currentNode_

protected SortableTreeNode currentNode_

_logger

protected Logger _logger
Constructor Detail

ActorInfoPanel

public ActorInfoPanel()
Creates a new instance of PolicyTemplatesTab

Method Detail

initialize

public void initialize(KPATApplet kpat,
                       TunnelClient tunnelClient)

policyAdded

public void policyAdded(ModelPolicy mp)
Specified by:
policyAdded in interface PolicyListener

policyChanged

public void policyChanged(ModelPolicy mp)
Specified by:
policyChanged in interface PolicyListener

policyRemoved

public void policyRemoved(ModelPolicy mp)
Specified by:
policyRemoved in interface PolicyListener

policiesRefreshed

public void policiesRefreshed(ModelPolicyList mpl)
Specified by:
policiesRefreshed in interface PolicyListener

buildActorInfoPanel

public javax.swing.JPanel buildActorInfoPanel()

showException

protected void showException(java.lang.String msg,
                             java.lang.Exception xcp)

updatePolicyPane

public void updatePolicyPane(SortableTreeNode node)
Update the policy pane with info for the specified object. This is called when the user selects an object in the tree view.

Parameters:
node - The corresponding tree node of object

updateGeneralInfoFields

public void updateGeneralInfoFields(iModelObject o)
Update the 'General Info' area (not the policy table) according to selected object.


policyTableUpdate

public void policyTableUpdate()
Update the JTable of polices for the currently selected node.


policyTableUpdate

public void policyTableUpdate(SortableTreeNode node)
Update the JTable of polices for the node. Actually, update the model 'behind' the table.


enableGovernableControls

protected void enableGovernableControls(boolean newState)
Set the enabled/disabled state of the policy-editing controls. Used to indicate the current JTree selection's Governable/Non-governable state.


showPropertiesDialog

protected void showPropertiesDialog()

removeProperty

protected void removeProperty()

showPropertiesDialog

protected void showPropertiesDialog(int row)

getShortName

protected java.lang.String getShortName(java.lang.String name)

setDlgLocation

public void setDlgLocation(javax.swing.JDialog dlg)

modelObjectAdded

public void modelObjectAdded(ModelObject modelObj)
Specified by:
modelObjectAdded in interface DomainListener

modelObjectChanged

public void modelObjectChanged(ModelObject modelObj)
Specified by:
modelObjectChanged in interface DomainListener

modelObjectRemoved

public void modelObjectRemoved(ModelObject modelObj)
Specified by:
modelObjectRemoved in interface DomainListener

modelRefreshed

public void modelRefreshed(ModelDomainList rootDomains)
Specified by:
modelRefreshed in interface DomainListener