Package gov.nasa.arc.mct.table.view

Examples of gov.nasa.arc.mct.table.view.TableCellSettings


      String cellName = getObjectName(rowIndex, columnIndex);

      Object value = getValueForComponent(component);
      if (value instanceof DisplayedValue) {
        DisplayedValue dv = (DisplayedValue) value;
        TableCellSettings cellSettings = getCellSettings(getKey(component));
        dv.setLabel(cellName!=null ? cellName : "");
        dv.setAlignment(cellSettings.getAlignment());
        dv.setNumberOfDecimals(cellSettings.getNumberOfDecimals());
      }
      return value;
    }
  }
View Full Code Here


   *
   * @param id the identifier of the component in the cell
   * @return the cell settings, or a new set of default settings if no settings have been stored
   */
  public TableCellSettings getCellSettings(String id) {
    TableCellSettings settings = cellSettings.get(id);
    if (settings == null) {
      settings = new TableCellSettings();
      cellSettings.put(id, settings);
    }
    return settings;
  }
View Full Code Here

   
    int maxDecimals = 0;
    for (int rowIndex=0; rowIndex < getRowCount(); ++rowIndex) {
      AbstractComponent component = (AbstractComponent) getStoredValueAt(rowIndex, columnIndex);
      if (component != null) {
        TableCellSettings cellSettings = getCellSettings(getKey(component));
        int cellDecimals = cellSettings.getNumberOfDecimals();
        if (cellDecimals < 0) {
          cellDecimals = TableCellSettings.DEFAULT_DECIMALS;
        }
       
        maxDecimals = Math.max(maxDecimals, cellDecimals);
View Full Code Here

TOP

Related Classes of gov.nasa.arc.mct.table.view.TableCellSettings

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.