public ContributorsPanel(List contributors) { base.\u002Ector(); ContributorsPanel contributorsPanel = this; ((Container) this).setLayout((LayoutManager) new BorderLayout()); this.model = (TableModel) new ContributorsTableModel(contributors); JTable.__\u003Cclinit\u003E(); this.table = new JTable(this.model); JScrollPane.__\u003Cclinit\u003E(); ((Container) this).add((Component) new JScrollPane((Component) this.table)); }
public LibraryPanel(List libraries) { base.\u002Ector(); LibraryPanel libraryPanel = this; ((Container) this).setLayout((LayoutManager) new BorderLayout()); this.model = new LibraryTableModel(libraries); JTable.__\u003Cclinit\u003E(); this.table = new JTable((TableModel) this.model); JScrollPane.__\u003Cclinit\u003E(); ((Container) this).add((Component) new JScrollPane((Component) this.table)); }
public virtual Component getTableCellRendererComponent(JTable table, object value, bool isSelected, bool hasFocus, int row, int column) { int num = isSelected ? 1 : 0; ((JComponent) this).setFont((Font) null); NumberFormat numberInstance = NumberFormat.getNumberInstance(); if (value != null) ((JLabel) this).setText(((Format) numberInstance).format(value)); else ((JLabel) this).setText(""); if (num != 0) this.setBackground(table.getSelectionBackground()); else this.setBackground((Color) null); return (Component) this; }
public PropertyEditor(JFrame frame) { base.\u002Ector((Frame) frame, true); PropertyEditor propertyEditor = this; this.tableModel = new PropertyEditor.PropTableModel(this); PropertyEditor.PropertiesTable.__\u003Cclinit\u003E(); this.table = (JTable) new PropertyEditor.PropertiesTable(this, (AbstractTableModel) this.tableModel); this.table.setGridColor((Color) Color.LIGHT_GRAY); this.table.setRowSelectionAllowed(false); JScrollPane.__\u003Cclinit\u003E(); JScrollPane jscrollPane = new JScrollPane((Component) this.table); ((Window) this).setBounds(100, 100, 300, 400); this.getContentPane().setLayout((LayoutManager) new BorderLayout()); this.getContentPane().add((Component) jscrollPane, (object) "Center"); }
public override void init() { this.add = new JButton("Add"); ((AbstractButton) this.add).addActionListener((ActionListener) new RobotPreferences\u00241(this)); this.remove = new JButton("Remove"); ((AbstractButton) this.remove).addActionListener((ActionListener) new RobotPreferences\u00242(this)); this.save = new JButton("Save"); ((AbstractButton) this.save).addActionListener((ActionListener) new RobotPreferences\u00243(this)); this.values = (Map) new LinkedHashMap(); Robot.getPreferences().addTableListener((ITableListener) this, true); this.model = new RobotPreferences.PreferenceTableModel(this, (RobotPreferences\u00241) null); JTable.__\u003Cclinit\u003E(); this.table = new JTable((TableModel) this.model); this.table.setSelectionMode(0); this.table.getTableHeader().setReorderingAllowed(false); JPanel jpanel1 = new JPanel(); ((Container) jpanel1).setLayout((LayoutManager) new GridLayout(0, 2)); ((Container) jpanel1).add((Component) this.add); ((Container) jpanel1).add((Component) this.remove); JPanel jpanel2 = new JPanel(); ((Container) jpanel2).setLayout((LayoutManager) new BorderLayout()); ((Container) jpanel2).add((Component) jpanel1, (object) "North"); ((Container) jpanel2).add((Component) this.save, (object) "South"); ((Container) this).setLayout((LayoutManager) new BorderLayout()); JScrollPane.__\u003Cclinit\u003E(); ((Container) this).add((Component) new JScrollPane((Component) this.table, 20, 31), (object) "Center"); ((Container) this).add((Component) jpanel2, (object) "South"); ((JComponent) this).setPreferredSize(new Dimension(300, 200)); }
public static JPanel createTablePanel(TableModel model) { JPanel.__\u003Cclinit\u003E(); JPanel jpanel = new JPanel((LayoutManager) new BorderLayout()); JTable jtable = new JTable(model); for (int index = 0; index < model.getColumnCount(); ++index) { TableColumn column = jtable.getColumnModel().getColumn(index); if (Object.instancehelper_equals((object) model.getColumnClass(index), RefineryUtilities.class\u0024java\u0024lang\u0024Number != null ? (object) RefineryUtilities.class\u0024java\u0024lang\u0024Number : (object) (RefineryUtilities.class\u0024java\u0024lang\u0024Number = RefineryUtilities.class\u0024("java.lang.Number")))) column.setCellRenderer((TableCellRenderer) new NumberCellRenderer()); } ((Container) jpanel).add((Component) new JScrollPane((Component) jtable)); return jpanel; }
/// <summary> /// <B>Deprecated.</B> <I>As of Swing version 1.0.2, /// replaced by <code>new JScrollPane(aTable)</code>.</I> /// </summary> static public JScrollPane createScrollPaneForTable(JTable @aTable) { return default(JScrollPane); }
/// <summary> /// <B>Deprecated.</B> <I>As of Swing version 1.0.2, /// replaced by <code>new JScrollPane(aTable)</code>.</I> /// </summary> static public JScrollPane createScrollPaneForTable(JTable @aTable) { return(default(JScrollPane)); }
/// <summary> /// Sets the table associated with this header. /// </summary> public void setTable(JTable @table) { }
public virtual Component getTableCellRendererComponent(JTable table, object value, bool isSelected, bool hasFocus, int row, int column) { if (table == null) { string str = "Table must not be null."; Throwable.__\u003CsuppressFillInStackTrace\u003E(); throw new NullPointerException(str); } else { SortableTableModel sortableTableModel = (SortableTableModel) table.getModel(); int num1 = table.convertColumnIndexToModel(column); int num2 = sortableTableModel.getSortingColumn() == num1 ? 1 : 0; int num3 = sortableTableModel.isAscending() ? 1 : 0; JTableHeader tableHeader = table.getTableHeader(); int num4 = num1 == this.pressedColumn ? 1 : 0; JComponent jcomponent; if (this.useLabels) { JLabel rendererLabel = this.getRendererLabel(num2 != 0, num3 != 0); rendererLabel.setText(value != null ? Object.instancehelper_toString(value) : ""); jcomponent = (JComponent) rendererLabel; } else { JButton rendererButton = this.getRendererButton(num2 != 0, num3 != 0); ((AbstractButton) rendererButton).setText(value != null ? Object.instancehelper_toString(value) : ""); ((AbstractButton) rendererButton).getModel().setPressed(num4 != 0); ((AbstractButton) rendererButton).getModel().setArmed(num4 != 0); jcomponent = (JComponent) rendererButton; } if (tableHeader != null) { jcomponent.setForeground(((Component) tableHeader).getForeground()); jcomponent.setBackground(((Component) tableHeader).getBackground()); jcomponent.setFont(((Component) tableHeader).getFont()); } return (Component) jcomponent; } }