Class PSubscriberPrefsServiceModel

java.lang.Object
com.portal.ctrl.AbstractTreeTableModel
com.portal.app.ccare.comp.PSubscriberPrefsServiceModel
All Implemented Interfaces:
TreeTableModel, TreeModel

public class PSubscriberPrefsServiceModel extends AbstractTreeTableModel implements TreeTableModel
ServicePrefsModel class is the Tree Table model for services tree to be displayed in Preferences Tab.
  • Field Details

    • configExists

      public boolean configExists
  • Constructor Details

    • PSubscriberPrefsServiceModel

      public PSubscriberPrefsServiceModel(ArrayList<PSubscriberPrefsServicesNode> serviceNodes)
      Gets the permission and also sets the treetable root
      Parameters:
      serviceNodes -
  • Method Details

    • getService

      protected PSubscriberPrefsServicesNode getService(Object node)
      Returns the servicenode for the node selected in the treetable model.
      Parameters:
      node -
      Returns:
      ServicePrefsNode
    • getChildren

      protected Object[] getChildren(Object node)
      Returns all the children of the Service node selected.
      Parameters:
      node -
      Returns:
      ServicePrefsNodes[]
    • getColumnClass

      public Class getColumnClass(int column)
      Returns column class.
      Specified by:
      getColumnClass in interface TreeTableModel
      Overrides:
      getColumnClass in class AbstractTreeTableModel
    • getChild

      public Object getChild(Object node, int i)
      Returns all the children of the Service node i.
      Specified by:
      getChild in interface TreeModel
      Parameters:
      node -
      i -
      Returns:
      ServicePrefsNodes[]
    • getChildCount

      public int getChildCount(Object node)
      Returns the child count of the node
      Specified by:
      getChildCount in interface TreeModel
      Parameters:
      node -
      Returns:
      children count
    • getColumnCount

      public int getColumnCount()
      Returns the column count of the tree table, It s being reduced by 1 because the intention is not to display the last column(Poid.class).
      Specified by:
      getColumnCount in interface TreeTableModel
      Returns:
      column count
    • getColumnName

      public String getColumnName(int column)
      Returns column name.
      Specified by:
      getColumnName in interface TreeTableModel
      Parameters:
      column -
      Returns:
      column name
    • getValueAt

      public Object getValueAt(Object node, int column)
      Returns the value of the cell stored in the servicenode
      Specified by:
      getValueAt in interface TreeTableModel
      Parameters:
      column -
      serviceNode -
      Returns:
      value
    • isCellEditable

      public boolean isCellEditable(Object node, int column)
      The cell is editable for the column which has service type and for the column which has check box, for all other columns it is not editable
      Specified by:
      isCellEditable in interface TreeTableModel
      Overrides:
      isCellEditable in class AbstractTreeTableModel
      Parameters:
      node -
      column -
      Returns:
      boolean
    • setValueAt

      public void setValueAt(Object value, Object node, int row, int column)
      This method sets the value of checkbox in the jTreeTable
      Specified by:
      setValueAt in interface TreeTableModel
      Overrides:
      setValueAt in class AbstractTreeTableModel
      Parameters:
      value - , to be set
      node - , service Node
      row -
      column -