public void setup(String label, EditorKit editorKit) { this.label = label; this.editorKit = editorKit; setBorder(BorderFactory.createEmptyBorder(30, 20, 20, 20)); setLayout(new PreferencesPanelLayoutManager(this)); }
public void setup(String label, EditorKit editorKit) { this.label = label; this.editorKit = editorKit; setBorder(BorderFactory.createEmptyBorder(30, 20, 20, 20)); setLayout(new PreferencesPanelLayoutManager(this)); }
public void setup(String label, EditorKit editorKit) { this.label = label; this.editorKit = editorKit; setBorder(BorderFactory.createEmptyBorder(30, 20, 20, 20)); setLayout(new PreferencesPanelLayoutManager(this)); }
public void initialise() throws Exception { OWLTreePreferences prefs = OWLTreePreferences.getInstance(); autoExpandEnabledCheckBox = new JCheckBox("Automatically expand hierarchies", prefs.isAutoExpandEnabled()); autoExpandMaxDepthSpinner = new JSpinner(new SpinnerNumberModel(prefs.getAutoExpansionDepthLimit(), 1, Integer.MAX_VALUE, 1)); autoExpandMaxChildSizeSpinner = new JSpinner(new SpinnerNumberModel(prefs.getAutoExpansionChildLimit(), 1, Integer.MAX_VALUE, 1)); JPanel autoExpansionPanel = new JPanel(); PreferencesPanelLayoutManager layout = new PreferencesPanelLayoutManager(autoExpansionPanel); autoExpansionPanel.setLayout(layout); autoExpansionPanel.add("", autoExpandEnabledCheckBox); autoExpansionPanel.add("Auto-expansion depth limit", autoExpandMaxDepthSpinner); autoExpansionPanel.add("Auto-expansion child count limit", autoExpandMaxChildSizeSpinner); autoExpansionPanel.setBorder(ComponentFactory.createTitledBorder("Automatic Hierarchy Expansion")); setLayout(new BorderLayout()); add(autoExpansionPanel, BorderLayout.CENTER); }
public void initialise() throws Exception { OWLTreePreferences prefs = OWLTreePreferences.getInstance(); autoExpandEnabledCheckBox = new JCheckBox("Automatically expand hierarchies", prefs.isAutoExpandEnabled()); autoExpandMaxDepthSpinner = new JSpinner(new SpinnerNumberModel(prefs.getAutoExpansionDepthLimit(), 1, Integer.MAX_VALUE, 1)); autoExpandMaxChildSizeSpinner = new JSpinner(new SpinnerNumberModel(prefs.getAutoExpansionChildLimit(), 1, Integer.MAX_VALUE, 1)); JPanel autoExpansionPanel = new JPanel(); PreferencesPanelLayoutManager layout = new PreferencesPanelLayoutManager(autoExpansionPanel); autoExpansionPanel.setLayout(layout); autoExpansionPanel.add("", autoExpandEnabledCheckBox); autoExpansionPanel.add("Auto-expansion depth limit", autoExpandMaxDepthSpinner); autoExpansionPanel.add("Auto-expansion child count limit", autoExpandMaxChildSizeSpinner); autoExpansionPanel.setBorder(ComponentFactory.createTitledBorder("Automatic Hierarchy Expansion")); setLayout(new BorderLayout()); add(autoExpansionPanel, BorderLayout.CENTER); }
public static void main(String[] args) { JPanel panel = new JPanel(); panel.setLayout(new PreferencesPanelLayoutManager(panel)); panel.add(new JTextField(30), "Base URI"); panel.add(new JCheckBox("Include year"));
public static void main(String[] args) { JPanel panel = new JPanel(); panel.setLayout(new PreferencesPanelLayoutManager(panel)); panel.add(new JTextField(30), "Base URI"); panel.add(new JCheckBox("Include year"));
PreferencesPanelLayoutManager man = new PreferencesPanelLayoutManager(fontSizePanel); fontSizePanel.setLayout(man); fontSizePanel.setBorder(ComponentFactory.createTitledBorder("Font"));
PreferencesPanelLayoutManager man = new PreferencesPanelLayoutManager(fontSizePanel); fontSizePanel.setLayout(man); fontSizePanel.setBorder(ComponentFactory.createTitledBorder("Font"));
public void initialise() throws Exception { OntologyPreferences prefs = OntologyPreferences.getInstance(); setLayout(new PreferencesPanelLayoutManager(this)); add(textField = new JTextField(prefs.getBaseURI().toString(), 40), "Default base URI"); add(yearCheckBox = new JCheckBox("Include year", prefs.isIncludeYear())); add(monthCheckBox = new JCheckBox("Include month", prefs.isIncludeMonth())); add(dayCheckBox = new JCheckBox("Include day", prefs.isIncludeDay())); yearCheckBox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { updateState(); } }); monthCheckBox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { updateState(); } }); // previewLabel = new JTextField(50); // previewLabel.setBackground(Color.WHITE); // previewLabel.setBorder(BorderFactory.createMatteBorder(1, 1, 1, 1, Color.LIGHT_GRAY)); updateState(); }
public void initialise() throws Exception { OntologyPreferences prefs = OntologyPreferences.getInstance(); setLayout(new PreferencesPanelLayoutManager(this)); add(textField = new JTextField(prefs.getBaseURI().toString(), 40), "Default base URI"); add(yearCheckBox = new JCheckBox("Include year", prefs.isIncludeYear())); add(monthCheckBox = new JCheckBox("Include month", prefs.isIncludeMonth())); add(dayCheckBox = new JCheckBox("Include day", prefs.isIncludeDay())); yearCheckBox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { updateState(); } }); monthCheckBox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { updateState(); } }); // previewLabel = new JTextField(50); // previewLabel.setBackground(Color.WHITE); // previewLabel.setBorder(BorderFactory.createMatteBorder(1, 1, 1, 1, Color.LIGHT_GRAY)); updateState(); }