Esempio n. 1
0
 private void setupRenderers(JTable table) {
   // setup a table cell renderer for each column:
   for (Enumeration<TableColumn> enumeration = table.getColumnModel().getColumns();
       enumeration.hasMoreElements(); ) {
     final TableColumn column = enumeration.nextElement();
     final int iModelIndex = column.getModelIndex();
     final CollectableEntityField clctef =
         this.timelimittaskview
             .getTimelimitTaskTableModel()
             .getCollectableEntityField(iModelIndex);
     final CollectableComponent clctcomp =
         CollectableComponentFactory.getInstance().newCollectableComponent(clctef, null, false);
     column.setCellRenderer(clctcomp.getTableCellRenderer(false));
   }
 }
 private void respectRights(boolean bWriteAllowed) {
   for (CollectableComponent clctcomp :
       this.getDetailsPanel().getEditView().getCollectableComponents()) {
     clctcomp.setReadOnly(!bWriteAllowed || !clctcomp.isEnabled());
   }
 }