Пример #1
0
 /** @inheritDoc */
 public Component getTableCellRendererComponent(
     JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
   Component c =
       candidate.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
   if (c instanceof JLabel && table != null) {
     ViperTableModel m = getCurrentModel();
     int modelIndex = table.convertColumnIndexToModel(column);
     AttrConfig ac = m.getAttributeForColumn(modelIndex);
     JLabel l = (JLabel) c;
     if (ac != null) {
       int visibility = mediator.getHiders().getAttrConfigVisibility(ac);
       l.setIcon(outerTablePanel.visibilityIcons[visibility]);
     } else if (m.getInternalColumn(modelIndex) == ViperTableModel.BY_VALID) {
       Config config = m.getConfig();
       int visibility = mediator.getHiders().getConfigVisibility(m.getConfig());
       if (visibility == NodeVisibilityManager.RANGE_LOCKED) {
         visibility = NodeVisibilityManager.LOCKED;
       }
       l.setIcon(outerTablePanel.visibilityIcons[visibility]);
     } else {
       l.setIcon(null);
     }
   }
   return c;
 }
Пример #2
0
 public void redoPropagateModel() {
   ViperTableModel m = (ViperTableModel) AbstractViperTable.this.getTable().getModel();
   m.fireTableDataChanged();
 }