Java Code Examples for javax.swing.JScrollPane#setName()
The following examples show how to use
javax.swing.JScrollPane#setName() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AdvantageModifierEditor.java From gcs with Mozilla Public License 2.0 | 5 votes |
private JScrollPane embedEditor(Container editor) { JScrollPane scrollPanel = new JScrollPane(editor); scrollPanel.setMinimumSize(new Dimension(500, 120)); scrollPanel.setName(editor.toString()); if (!mIsEditable) { UIUtilities.disableControls(editor); } return scrollPanel; }
Example 2
Source File: EquipmentModifierEditor.java From gcs with Mozilla Public License 2.0 | 5 votes |
private JScrollPane embedEditor(Container editor) { JScrollPane scrollPanel = new JScrollPane(editor); scrollPanel.setMinimumSize(new Dimension(500, 120)); scrollPanel.setName(editor.toString()); if (!mIsEditable) { UIUtilities.disableControls(editor); } return scrollPanel; }
Example 3
Source File: EquipmentEditor.java From gcs with Mozilla Public License 2.0 | 5 votes |
private JScrollPane embedEditor(Container editor) { JScrollPane scrollPanel = new JScrollPane(editor); scrollPanel.setMinimumSize(new Dimension(500, 120)); scrollPanel.setName(editor.toString()); if (!mIsEditable) { UIUtilities.disableControls(editor); } return scrollPanel; }
Example 4
Source File: SkillEditor.java From gcs with Mozilla Public License 2.0 | 5 votes |
private JScrollPane embedEditor(Container editor) { JScrollPane scrollPanel = new JScrollPane(editor); scrollPanel.setMinimumSize(new Dimension(500, 120)); scrollPanel.setName(editor.toString()); if (!mIsEditable) { UIUtilities.disableControls(editor); } return scrollPanel; }
Example 5
Source File: TechniqueEditor.java From gcs with Mozilla Public License 2.0 | 5 votes |
private JScrollPane embedEditor(Container editor) { JScrollPane scrollPanel = new JScrollPane(editor); scrollPanel.setMinimumSize(new Dimension(500, 120)); scrollPanel.setName(editor.toString()); if (!mIsEditable) { UIUtilities.disableControls(editor); } return scrollPanel; }
Example 6
Source File: BaseSpellEditor.java From gcs with Mozilla Public License 2.0 | 5 votes |
protected JScrollPane embedEditor(Component editor) { JScrollPane scrollPanel = new JScrollPane(editor); scrollPanel.setMinimumSize(new Dimension(500, 120)); scrollPanel.setName(editor.toString()); if (!mIsEditable) { UIUtilities.disableControls(editor); } return scrollPanel; }
Example 7
Source File: AdvantageEditor.java From gcs with Mozilla Public License 2.0 | 5 votes |
private JScrollPane embedEditor(JPanel editor) { JScrollPane scrollPanel = new JScrollPane(editor); scrollPanel.setMinimumSize(new Dimension(500, 120)); scrollPanel.setName(editor.toString()); if (!mIsEditable) { UIUtilities.disableControls(editor); } return scrollPanel; }
Example 8
Source File: MosaicExpressionsPanel.java From snap-desktop with GNU General Public License v3.0 | 5 votes |
private JScrollPane createVariablesTable(final String labelName) { variablesTable = new JTable(); variablesTable.setName(labelName); variablesTable.setRowSelectionAllowed(true); bindingCtx.bind("variables", new VariablesTableAdapter(variablesTable)); bindingCtx.bindEnabledState("variables", false, "updateMode", true); variablesTable.addMouseListener(createExpressionEditorMouseListener(variablesTable, false)); final JTableHeader tableHeader = variablesTable.getTableHeader(); tableHeader.setName(labelName); tableHeader.setReorderingAllowed(false); tableHeader.setResizingAllowed(true); final TableColumnModel columnModel = variablesTable.getColumnModel(); columnModel.setColumnSelectionAllowed(false); final TableColumn nameColumn = columnModel.getColumn(0); nameColumn.setPreferredWidth(100); nameColumn.setCellRenderer(new TCR()); final TableColumn expressionColumn = columnModel.getColumn(1); expressionColumn.setPreferredWidth(400); expressionColumn.setCellRenderer(new TCR()); final ExprEditor exprEditor = new ExprEditor(false); expressionColumn.setCellEditor(exprEditor); bindingCtx.addPropertyChangeListener("updateMode", new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { final boolean enabled = Boolean.FALSE.equals(evt.getNewValue()); exprEditor.button.setEnabled(enabled); } }); final JScrollPane scrollPane = new JScrollPane(variablesTable); scrollPane.setName(labelName); scrollPane.setPreferredSize(new Dimension(PREFERRED_TABLE_WIDTH, 150)); return scrollPane; }
Example 9
Source File: MosaicExpressionsPanel.java From snap-desktop with GNU General Public License v3.0 | 4 votes |
private JScrollPane createConditionsTable(final String labelName) { conditionsTable = new JTable() { private static final long serialVersionUID = 1L; @Override public Class getColumnClass(int column) { if (column == 2) { return Boolean.class; } else { return super.getColumnClass(column); } } }; conditionsTable.setName(labelName); conditionsTable.setRowSelectionAllowed(true); bindingCtx.bind("conditions", new ConditionsTableAdapter(conditionsTable)); bindingCtx.bindEnabledState("conditions", false, "updateMode", true); conditionsTable.addMouseListener(createExpressionEditorMouseListener(conditionsTable, true)); final JTableHeader tableHeader = conditionsTable.getTableHeader(); tableHeader.setName(labelName); tableHeader.setReorderingAllowed(false); tableHeader.setResizingAllowed(true); final TableColumnModel columnModel = conditionsTable.getColumnModel(); columnModel.setColumnSelectionAllowed(false); final TableColumn nameColumn = columnModel.getColumn(0); nameColumn.setPreferredWidth(100); nameColumn.setCellRenderer(new TCR()); final TableColumn expressionColumn = columnModel.getColumn(1); expressionColumn.setPreferredWidth(360); expressionColumn.setCellRenderer(new TCR()); final ExprEditor cellEditor = new ExprEditor(true); expressionColumn.setCellEditor(cellEditor); bindingCtx.addPropertyChangeListener("updateMode", new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { final boolean enabled = Boolean.FALSE.equals(evt.getNewValue()); cellEditor.button.setEnabled(enabled); } }); final TableColumn outputColumn = columnModel.getColumn(2); outputColumn.setPreferredWidth(40); final JScrollPane pane = new JScrollPane(conditionsTable); pane.setName(labelName); pane.setPreferredSize(new Dimension(PREFERRED_TABLE_WIDTH, 80)); return pane; }