com.adventnet.snmp.ui
Class DefaultSnmpTablePanelModel

java.lang.Object
  |
  +--com.adventnet.snmp.beans.SnmpServer
        |
        +--com.adventnet.snmp.beans.SnmpTarget
              |
              +--com.adventnet.snmp.beans.SnmpTable
                    |
                    +--com.adventnet.snmp.beans.ClippedTable
                          |
                          +--com.adventnet.snmp.ui.DefaultSnmpTablePanelModel

class DefaultSnmpTablePanelModel
extends ClippedTable
implements SnmpTablePanelModel

This is an implementation of SnmpTablePanelModel

See Also:
Serialized Form

Field Summary
(package private)  boolean isUpdateScrollBar
           
(package private)  java.util.Vector namesToIndex
           
 
Fields inherited from class com.adventnet.snmp.beans.ClippedTable
end_flag, end_flagInd, FROM_INDEX, FROM_ORIGIN, indeces, index_flag, indexMibNodes, indexNames, isAugmentedDisplay, modeOfGetting, next, next_1, numberVisibleRow, polling, row_count, stack, stackInd, stop, stringData, stroid, subOidList, tableoid, temp_count
 
Fields inherited from class com.adventnet.snmp.beans.SnmpTable
ADDandDELcol, augmentedTableoid, cnam, colOIDs, columnClass, columnNames, columns, columnsPolled, DATA_TYPE, editable, externalIndices, holes, holesCount, holesGot, isAugmentedTable, isEntryStatus, isNotInSubTree, noAccessIndex, nodes, num_col, performSets, pollInterval, RETRIEVAL_MODE, rootoid, rowtry, shifting, SNMP_VARIABLE_BINDING_DATA, SNMP_VARIABLE_DATA, STRING_DATA, syntax, tableData, tableListeners, tableOID, thisThread
 
Fields inherited from class com.adventnet.snmp.beans.SnmpTarget
ackFlag, debugListeners, genericTrap, genericTraps, informReqID, mibModules, serialize, SNMPGET, SNMPGETBULK, SNMPGETNEXT, SNMPINFORM, SNMPREPORT, SNMPRESPONSE, SNMPSET, SNMPTRAP, snmpTrapEnterprise, snmpTrapOid, SNMPV2TRAP, upTime, VERSION1, VERSION2C, VERSION3
 
Fields inherited from class com.adventnet.snmp.beans.SnmpServer
api, applet, ASN1_ERROR_ERR, ASN1_ERROR_OID, attemptCompleteData, attemptPartialData, AUTH_NO_PRIV, AUTH_PRIV, authKey, authPassword, authProtocol, broadCast, clientID, community, contextID, contextName, count, debugon, DECRYPT_ERROR_ERR, DECRYPT_ERROR_OID, discoveryTimeSyncListener, enc, engineID, engineTable, error, errorCode, errorcodes, errorIndex, exceptionCode, exceptionCodes, finalize_called, group, group_oidList, isName, isNotSet, isSendPDUByGroup, listeners, localAddrs, localPort, logFlag, loggerImpl, logLevel, logType, matchServ, matchtable, MAX_NUM_ROWS, maxRepetitions, MD5_AUTH, mibOps, NO_AUTH, NO_AUTH_NO_PRIV, nonRepeaters, NOT_TIME_WINDOWS_ERR, NOT_TIME_WINDOWS_OID, nullsession_targets, oidList, options, pduErrorIndex, pollertargets, pollInterval, port, port_targets, principal, printStr, privKey, privPassword, privProtocol, propertylisteners, protocol, reqHandler, reqid, retries, secModel, securityLevel, sendTimeoutEvents, sentreqid, session, session_port_targets, session_targets, sessionName, SHA_AUTH, SNMPGET, SNMPGETBULK, SNMPGETNEXT, SNMPINFORM, SNMPREPORT, SNMPRESPONSE, SNMPSET, snmpStore, SNMPTRAP, SNMPV2TRAP, targetHost, targets, timeout, UKN_ENGINEID_ERR, UKN_ENGINEID_OID, UKN_USERNAMES_ERR, UKN_USERNAMES_OID, UNSUPP_SEC_LEVEL_ERR, UNSUPP_SEC_LEVEL_OID, userError, userErrorCode, usmTable, v3ErrorTable, validateUser, varbinds_per_request, varList, version, VERSION1, VERSION2C, VERSION3, writeCommunity, WRONG_DIGEST_ERR, WRONG_DIGEST_OID
 
Fields inherited from interface com.adventnet.snmp.ui.SnmpTablePanelModel
GRAPHABLE, NONGRAPHABLE
 
Constructor Summary
DefaultSnmpTablePanelModel()
          Constructs a DefaultSnmpTablePanelModel with 5 rows and 5 columns
DefaultSnmpTablePanelModel(java.applet.Applet applet)
          Constructs a DefaultSnmpTablePanelModel with 5 rows and 5 columns for applets
 
Method Summary
 void addRow(boolean entryStatus, SnmpOID[] oidList, java.lang.String[] values)
          add an row to table with specified objectid list and value and also with the status of table whether it is an entryStatus or rowStatus.
 void addTableModelListener(javax.swing.event.TableModelListener l)
          Add a listener to the list that's notified each time a change to the data model occurs.
 int convertColumnIndexToModel(int column)
           
 void deleteRows(int[] rows)
          deletes the rows specified with indexes.
(package private)  void enumintqSort(int left, int right)
           
 void fireColumnMoved(int fromIndex, int toIndex)
          Called from columnMoved() method in SnmpTablePanelUI.
 void fireScrollBarMoved(int value)
          Called from adjustmentValueChanged() method in SnmpTablePanelUI.
 java.lang.Class getColumnClass(int columnIndex)
          Returns the class to be used as renderer and editor for the column specified by the index.
 int getColumnCount()
          return the number of columns.
 int getColumnIndex(java.lang.String columnName)
          To get the column index from the column names
 java.util.Vector getColumnMibNodes()
          returns the vector of mibnodes for all columns of this table
 java.lang.String getColumnName(int columnIndex)
          returns the column name corresponding to the column index.
 java.util.Vector getColumnNames()
          ruturns the vector of column names for this table
 int getColumnsPerGet()
          Get the no of Columns Per Get
 boolean getColumnsSplit()
          get the flag ColumnSplit
 byte getColumnType(int columnIndex)
          returns whether column at the specified index can be graphable or not
 java.lang.String getDecodedInstanceStr(java.util.Vector values)
          returns the decoded instance string for the values of indexes
 void getEntriesFromNext()
          this will generate the entries of next page
 void getEntriesFromPrev()
          this will generate the entries of previous page
 void getEntriesFromRefresh()
          this will refresh the entries of current page
 void getEntriesFromStart(java.lang.String index)
          this will generate entries from the first row of the SnmpTable.
 java.lang.String getIndexField(int rowIndex)
          returns the index value for specified row
 java.util.Vector getIndexMibNodes()
          returns the vector of mibnodes for index columns of this table
 java.util.Vector getIndexNames()
          returns the vector of index names for this table
 java.lang.String[][] getNotAccessibleIndex()
          Get the Not Accessible Index values.
 java.util.Vector getNotAccessIndexColumns()
          Get the ColumnNames of Not Accessible Index values
 java.lang.String[] getObjectIDList()
          Returns an array of OIDList.
 int getPageNumber()
          returns the current page number.
 int getRowCount()
          returns the number of rows that are polled.
 SnmpTable getSnmpTable()
          returns the instanse of SnmpTable.
 SnmpTablePanel getSnmpTablePanel()
          Getting the instance of SnmpTablePanelUI for tableupdation
 java.util.Vector getSnmpVarVec(int row)
          returns the vector of SnmpVar objects for the spoecified row
 java.lang.String getTableOID()
          returns the tableoid
 int getTableViewColumnCount()
          returns number of columns to be visible in tablemodel
 int getTableViewRowCount()
          returns number of rows to be visible in tablemodel
 int getTotalColumnCount()
          returns the number of columns in the SnmpTable
 java.lang.Object getValueAt(int row, int col)
          returns the value for table cell at given row and column.
(package private)  void intqSort(int left, int right)
           
 boolean isAugmentedDisplay()
          returns the status of table whether it is agugmented table or of its original table .
 boolean isAugmentedTable()
          returns whether the table is augmented one or not
 boolean isCellEditable(int rowIndex, int columnIndex)
          Returns whether the cell at the location(rowIndex,columnIndex) is editable or not
 boolean isEntryStatus()
          returns whether the table is having entryStatus column or rowStatus column
 boolean isGetFromIndex()
          returns true if the table values is generated from the index .
 boolean isRetrievalMode()
          returns whether the table should be generated by getnext mode or getbulk mode.
 boolean isRowAddAndDel()
          returns whether the rows can be added and deleted
 boolean isUpdateScrollBar()
          tells whether the scroll bar should be updated or not.
(package private)  void logErrorMessage(java.lang.String error)
          All the methods of this class (including sub classes), which needs to redirect an error message to the LogManger or to the standard console, can use this method.
(package private)  void logInfoMessage(java.lang.String info)
          All the methods of this class (including sub classes), which needs to redirect an info message to the LogManger or to the standard console, can use this method.
 void prepareEntries()
          this will generate entries for table when the custom panel is disabled
(package private)  void qSort(int left, int right)
           
protected  void refresh()
          refreshes the table data
 void removeTableModelListener(javax.swing.event.TableModelListener l)
          Remove a listener from the list that's notified each time a change to the data model occurs.
 void setAugmentedDisplay(boolean isAugmented)
          set the status of table whether it is agugmented table or of its original table .set true if the visible table is its augmented table, set returns false if it is a original table what specified in setTableOID
 void setColumnNameAt(java.lang.String name, int columnIndex)
          set the header name at the given index.
 void setColumnOrder(int columnIndex)
          it will form the entries in ascending order based on the values at specified column.
 void setColumnsPerGet(int columnsPerGet)
          Set the no of Columns Per Get
 void setColumnsSplit(boolean split)
          Enables the TableColumns split option if the split is set to true
 void setGetFromIndex(boolean isFromIndex)
          set whether the values filled by the table should be starting with the given index or from first row in the original table.
 void setObjectIDList(java.lang.String[] s)
          Sets the object IDs
 void setRetrievalMode(boolean mode)
          set whether the table should be generated by getnext mode or getbulk mode.
 void setSnmpTablePanel(SnmpTablePanel panel)
          Getting the instance of SnmpTablePanelUI for tableupdation
 void setTableOID(java.lang.String oid)
          Set the table OID
 void setTablePanelUI(SnmpTablePanelUI panel)
          Getting the instance of SnmpTablePanelUI for tableupdation
 void setTableViewColumnCount(int viewColumns)
          set number of columns to be visible in tablemodel
 void setTableViewRowCount(int viewRows)
          set number of rows to be visible in tablemodel
 void setupCellEditor(javax.swing.JTable table)
          set the table cell editor for table .Called from tableUpdate() method in SnmpTablePanelUI.
 void setValueAt(java.lang.Object value, int row, int col)
          Sets the value at the cell specified by the row and column indexes.
protected  void showErrorMessage(java.lang.String str)
           
(package private)  void swap(int i, int j)
           
 
Methods inherited from class com.adventnet.snmp.beans.ClippedTable
addRow, copyIndex, emptyStack, emptyStackInd, finalize, getAllColumnNodes, getColumns, getCurrentPage, getHoles, getInstanceStr, getLeafSyntax, getModeOfGettingTable, getNext, getNumCols, getNumOfVisibleRows, getOverwriteCMI, getPageSize, getPolledNumRows, getSerializedMibFileName, getStringValueAt, getTableColumnNames, isEndOfTable, isLoadFromCompiledMibs, isLoadFromSerializedMibs, isReadDesc, isSerializeMibs, run, run1, setHeaderName, setIndex, setIndexForIndex, setIndexInd, setLoadFromCompiledMibs, setLoadFromSerializedMibs, setModeOfGettingTable, setNext_1, setNext, setNumCols, setNumOfVisibleRows, setOverwriteCMI, setReadDesc, setSerializedMibFileName, setSerializeMibs, setSnmpOIDList, setStringOID, setStringValueAt, setsubOidList, setvalue, stopCurrentThread, stopPolling
 
Methods inherited from class com.adventnet.snmp.beans.SnmpTable
addRow, addSnmpTableListener, checkDifferences, compareRow, deleteRow, genTableEvent, getCellValue, getColumn, getColumn, getColumnMibNode, getDataType, getIndices, getNotAccessibleIndexColumns, getPerformSets, getPerformSets, getPollInterval, getRetrievalMode, getRow, getRow, getRow, getRowCol, getRowFromArray, refreshTable, removeSnmpTableListener, setCellValue, setColumnsPolled, setDataType, setObjectIDListWoStart, setParams, setPollInterval, setSuperObjectIDList, setTableOIDWoStart, startPollingTable, stopPollingTable
 
Methods inherited from class com.adventnet.snmp.beans.SnmpTarget
addLogClient, addLogClient, addObjectID, addResultListener, addSnmpOID, addSnmpPropertyListener, addUserError, addV3HandShakeResultListener, enableDebugForPDU, genEvent, genTimeoutEvent, getAttemptComplete, getAttemptPartial, getAuthPassword, getAuthProtocol, getCommunity, getCompleteResponse, getContextID, getContextName, getDebug, getEngineID, getErrorCode, getErrorCodes, getErrorIndex, getErrorString, getExceptionCode, getExceptionCodes, getIgnoreSpecificControlCodes, getMaxNumRows, getMaxRepetitions, getMibModules, getMibOperations, getNonRepeaters, getObjectID, getObjectID, getPduErrorIndex, getPrincipal, getPrivPassword, getRetries, getSecurityLevel, getSecurityModel, getSendTimeoutEvents, getSnmpOID, getSnmpOIDList, getSnmpVariables, getSnmpVersion, getTargetHost, getTargetPort, getTimeout, getUserErrorCode, getUserErrorString, getV1TrapOids, getVarBindCount, getWriteCommunity, isInSubTree, isInSubTree, isSerialize, loadMibs, releaseResources, removeLogClient, removeResultListener, removeSnmpPropertyListener, removeV3HandShakeListener, setAttemptComplete, setAttemptPartial, setAuthPassword, setAuthProtocol, setClientID, setCommunity, setContextID, setContextName, setDebug, setEngineID, setIgnoreSpecificControlCodes, setMaxNumRows, setMaxRepetitions, setMibModules, setNonRepeaters, setObjectID, setObjectID, setParams, setParams, setPrincipal, setPrivPassword, setRetries, setSecurityLevel, setSecurityModel, setSendTimeoutEvents, setSnmpOID, setSnmpVersion, setTargetHost, setTargetPort, setTimeout, setVarBindCount, setWriteCommunity, snmpGet, snmpGet, snmpGetAllList, snmpGetAllVariableBindings, snmpGetAllVariables, snmpGetBulkList, snmpGetBulkVariableBindings, snmpGetBulkVariables, snmpGetList, snmpGetList, snmpGetNext, snmpGetNext, snmpGetNextList, snmpGetNextList, snmpGetNextVariable, snmpGetNextVariableBinding, snmpGetNextVariableBindings, snmpGetNextVariables, snmpGetVariable, snmpGetVariableBinding, snmpGetVariableBindings, snmpGetVariables, snmpSendInformAcknowledgement, snmpSendInformRequest, snmpSendInformRequest, snmpSendNotification, snmpSendNotification, snmpSendTrap, snmpSendTrap, snmpSet, snmpSet, snmpSetList, snmpSetVariable, snmpSetVariableList, snmpSetVariables, updateMibs, vetoableChange
 
Methods inherited from class com.adventnet.snmp.beans.SnmpServer
assignLogger, async_create_v3_tables, create_v3_tables, genEvent, getCharacterEncoding, getCompleteResponse, getGROUPSNMPResponse, getHostAddress, getLocalAddresses, getMibPath, getPacketBufferSize, getPdu, getSecLevelForTimeSync, getSecurityProvider, getSecurityTable, getSimpleDateFormat, getSnmpEngineID, getSnmpEngineTable, getSNMPResponse, getSNMPResponse, getSNMPResponse, getTimeoutInMilliSec, getTimeToWait, getUSMTable, getV3ConfigTable, initJdbcParams, initSecurityProvider, initSnmpStore, isBroadcastFeatureEnable, isLoadMibsFromDatabase, isOverwriteCMI, isOverwriteMibsInDatabase, isSendPDUByGroup, isSetAutoInformResponse, isSupportedSecurityModel, isV3DatabaseFlag, isValidateUser, manage_v3_tables, managing_v3_tables, sendSNMPRequest, sendSNMPRequest, sendSNMPRequest, setAutoInformResponse, setBroadcastFeatureEnable, setCharacterEncoding, setErrorMessage, setLoadMibsFromDatabase, setMibOperations, setMibPath, setOverwriteMibsInDatabase, setPacketBufferSize, setPduParams, setReceiveBufferSize, setSecLevelForTimeSync, setSendPDUByGroup, setSimpleDateFormat, setSnmpEngineID, setTimeoutInMilliSec, setTimeToWait, setV3ConfigTable, setV3DatabaseFlag, updateEntry, validateUser
 
Methods inherited from class java.lang.Object
, clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isUpdateScrollBar

boolean isUpdateScrollBar

namesToIndex

java.util.Vector namesToIndex
Constructor Detail

DefaultSnmpTablePanelModel

public DefaultSnmpTablePanelModel()
Constructs a DefaultSnmpTablePanelModel with 5 rows and 5 columns

DefaultSnmpTablePanelModel

public DefaultSnmpTablePanelModel(java.applet.Applet applet)
Constructs a DefaultSnmpTablePanelModel with 5 rows and 5 columns for applets
Method Detail

fireScrollBarMoved

public void fireScrollBarMoved(int value)
Called from adjustmentValueChanged() method in SnmpTablePanelUI. The changed scrollbar value is notified to the model to adjust its columns.
Specified by:
fireScrollBarMoved in interface SnmpTablePanelModel

convertColumnIndexToModel

public int convertColumnIndexToModel(int column)
Specified by:
convertColumnIndexToModel in interface SnmpTablePanelModel

addTableModelListener

public void addTableModelListener(javax.swing.event.TableModelListener l)
Add a listener to the list that's notified each time a change to the data model occurs.
Specified by:
addTableModelListener in interface SnmpTablePanelModel
Parameters:
l - - the TableModelListener

removeTableModelListener

public void removeTableModelListener(javax.swing.event.TableModelListener l)
Remove a listener from the list that's notified each time a change to the data model occurs.
Specified by:
removeTableModelListener in interface SnmpTablePanelModel