Package com.l2fprod.common.propertysheet.PropertySheetTableModel

Examples of com.l2fprod.common.propertysheet.PropertySheetTableModel.Item


            // TODO Auto-generated method stub
            final JLabel cell = (JLabel) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);

            PropertySheetTableModel tableModel = (PropertySheetTableModel) table.getModel();

            Item item = tableModel.getPropertySheetElement(row);

            String name = item.getName();

            if ("contentType".equals(name)) {
                short id = (Short) value;
                switch (id) {
                    case XSComplexTypeDefinition.CONTENTTYPE_ELEMENT:
View Full Code Here


   * @see javax.swing.JTable#getCellEditor(int, int)
   */
  public TableCellEditor getCellEditor(int row, int column) {
    if (column == 0) { return null; }

    Item item = getSheetModel().getPropertySheetElement(row);
    if (!item.isProperty())
      return null;
   
    TableCellEditor result = null;
    Property propery = item.getProperty();
    PropertyEditor editor = getEditorFactory().createPropertyEditor(propery);
    if (editor != null)
      result = new CellEditorAdapter(editor);

    return result;
View Full Code Here

   * with "toggle" knob.
   */
  private class ToggleAction extends AbstractAction {
    public void actionPerformed(ActionEvent e) {     
      int row = PropertySheetTable.this.getSelectedRow();
      Item item = PropertySheetTable.this.getSheetModel()
        .getPropertySheetElement(row);
      item.toggle();
      PropertySheetTable.this.addRowSelectionInterval(row, row);
    }
View Full Code Here

      PropertySheetTable.this.addRowSelectionInterval(row, row);
    }
    public boolean isEnabled() {
      int row = PropertySheetTable.this.getSelectedRow();
      if (row != -1) {
        Item item = PropertySheetTable.this.getSheetModel()
          .getPropertySheetElement(row);       
        return item.hasToggle();
      } else {
        return false;
      }
    }
View Full Code Here

      PropertySheetTable table = (PropertySheetTable) event.getComponent();
      int row = table.rowAtPoint(event.getPoint());
      int column = table.columnAtPoint(event.getPoint());
      if (row != -1 && column == 0) {
        // if we clicked on an Item, see if we clicked on its hotspot
        Item item = table.getSheetModel().getPropertySheetElement(row);       
        int x = event.getX() - getIndent(table, item);
        if (x > 0 && x < HOTSPOT_SIZE)
          item.toggle();
      }
    }
View Full Code Here

TOP

Related Classes of com.l2fprod.common.propertysheet.PropertySheetTableModel.Item

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.