Package jmt.framework.gui.table.editors

Examples of jmt.framework.gui.table.editors.ButtonCellEditor


        return super.getCellRenderer(row, 1);
      } else if (column == 6) {
        /*if distribution column contains null value, no editor must be displayed,
        as this class is a closed one (e.g. described by population)*/
        if (getValueAt(row, column - 1) != null) {
          return new ButtonCellEditor(editDistributionButton);
        } else {
          return getDefaultRenderer(String.class);
        }
      }
      // Column for refercence source
      else if (column == 7) {
        return stations.getRenderer();
      } else if (column == 8) {
        return new ButtonCellEditor(deleteButton);
      } else {
        return getDefaultRenderer(getModel().getColumnClass(column));
      }
    }
View Full Code Here


    @Override
    public TableCellEditor getCellEditor(int row, int column) {
      if (column == 0) {
        return new ColorCellEditor();
      } else if (column == 6 && getValueAt(row, column - 1) != null) {
        return new ButtonCellEditor(new JButton(editDistribution));
      } else if (column == 7 && getValueAt(row, 2).equals("Open")) {
        return stations.getEditor(stationdefinition.getStationKeysSource());
      } else if (column == 7 && getValueAt(row, 2).equals("Closed")) {
        return stations.getEditor(stationdefinition.getStationKeysNoSourceSink());
      } else if (column == 8) {
        return new ButtonCellEditor(new JButton(deleteClass));
      } else {
        return super.getCellEditor(row, column - 1);
      }
    }
View Full Code Here

      }

      @Override
      public TableCellRenderer getCellRenderer(int row, int column) {
        if (column == 2) {
          return new ButtonCellEditor(delVar);
        }
        return getDefaultRenderer(String.class);
      }

      @Override
      public TableCellEditor getCellEditor(int row, int column) {
        if (column == 2) {
          return new ButtonCellEditor(new JButton(deleteVar));
        }
        return super.getCellEditor(row, column);
      }
    };
    clusteringTable.setFont(new Font(clusteringTable.getFont().getName(), clusteringTable.getFont().getStyle(), clusteringTable.getFont()
View Full Code Here

    sizeColumnsAndRows();
    setRowHeight(ROW_HEIGHT);
    this.getColumnModel().getColumn(1).setCellEditor(new DefaultCellEditor(combobox));
    /*this.getColumnModel().getColumn(5).setCellEditor(
        new DefaultCellEditor(combobox));*/
    this.getColumnModel().getColumn(columnSizes.length - 1).setCellEditor(new ButtonCellEditor(new JButton(deleteVar)));
  }
View Full Code Here

      return new ComboBoxCell(regularExpr);*/
    if (column == 1 || column == 3 || column == 4 || column == 5 || column == 6 || column == 7) {
      return getDefaultRenderer(String.class);
    }
    if (column == columnSizes.length - 1) {
      return new ButtonCellEditor(delVar);
    }
    if (column == 0) {
      return getDefaultRenderer(Boolean.class);
    }
    if (column == 2) {
View Full Code Here

        return new DefaultCellEditor(regCombo);
      }*/
    if (column == 2) {
      return new DefaultCellEditor(combobox);
    } else if (column == columnSizes.length - 1) {
      return new ButtonCellEditor(new JButton(deleteVar));
    } else {
      return super.getCellEditor(row, column);
    }
  }
View Full Code Here

     */
    public RegionTable() {
      super(new RegionTableModel());
      blockRenderer = new BlockingElementRenderer();
      delete.setFocusable(false);
      deleteRenderer = new ButtonCellEditor(delete);
      setRowHeight(ROW_HEIGHT);

      // Sets column size
      getColumnModel().getColumn(0).setPreferredWidth(120);
      getColumnModel().getColumn(1).setPreferredWidth(50);
View Full Code Here

        case 1:
          return super.getDefaultEditor(String.class);
        case 2:
          return super.getDefaultEditor(Boolean.class);
        case 3:
          return new ButtonCellEditor(delete);
        default:
          return null;
      }
    }
View Full Code Here

    }

    @Override
    public TableCellRenderer getCellRenderer(int row, int column) {
      if (column == columnSizes.length - 1 && getValueAt(row, 1) != SERVICE_ZERO) {
        return new ButtonCellEditor(editButton);
      } else if (column == 1) {
        return ComboBoxCellEditor.getRendererInstance();
      } else if (column == 0) {
        return classEditor.getRenderer();
      } else {
View Full Code Here

    @Override
    public TableCellEditor getCellEditor(int row, int column) {
      if (column == 1) {
        return ComboBoxCellEditor.getEditorInstance(serviceType);
      } else if (column == columnSizes.length - 1) {
        return new ButtonCellEditor(new JButton(editDistribution));
      } else {
        return super.getCellEditor(row, column);
      }
    }
View Full Code Here

TOP

Related Classes of jmt.framework.gui.table.editors.ButtonCellEditor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.