Package com.camick

Examples of com.camick.TableColumnAdjuster


    JTable runesTable = new JTable();
    RunePageTableModel model = new RunePageTableModel(runePage.getSlots());
    runesTable.setModel(model);
   
    TableColumnAdjuster columnAdjuster = new TableColumnAdjuster(runesTable);
    int slotLength = Math.max(columnAdjuster.getColumnDataWidth(0), columnAdjuster.getColumnHeaderWidth(0));
    runesTable.getColumnModel().getColumn(0).setMaxWidth(slotLength);
    int nameLength = Math.max(columnAdjuster.getColumnDataWidth(1), columnAdjuster.getColumnHeaderWidth(1));
    runesTable.getColumnModel().getColumn(1).setMinWidth(nameLength);
    this.add(new VerticalJScrollPane(runesTable), BorderLayout.CENTER);
  }
View Full Code Here


  public void setRuneInventoryModel(RunesInventoryTableModel model) {
    runesTable.setModel(model);
  }
 
  public void setColumnSizes() {
    TableColumnAdjuster columnAdjuster = new TableColumnAdjuster(runesTable);
    int amountSize = Math.max(columnAdjuster.getColumnDataWidth(0), columnAdjuster.getColumnHeaderWidth(0));
    runesTable.getColumnModel().getColumn(0).setMaxWidth(amountSize);
    pack();
  }
View Full Code Here

TOP

Related Classes of com.camick.TableColumnAdjuster

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.