private JComponent createPane(String title, int orientation) { JComponent c = new Box(orientation){ public Dimension getMaximumSize() { return new Dimension(super.getMaximumSize().width, getPreferredSize().height); } }; c.setAlignmentX(0.0f); if (title != null){ c.setBorder(ComponentFactory.createTitledBorder(title)); } return c; }
private JComponent createPane(String title, int orientation) { JComponent c = new Box(orientation){ public Dimension getMaximumSize() { return new Dimension(super.getMaximumSize().width, getPreferredSize().height); } }; c.setAlignmentX(0.0f); if (title != null){ c.setBorder(ComponentFactory.createTitledBorder(title)); } return c; }
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); }
private void createUI() { setLayout(new BorderLayout(7, 7)); textField = new JTextField(); JPanel textFieldPanel = new JPanel(new BorderLayout()); textFieldPanel.add(textField); textFieldPanel.setBorder(ComponentFactory.createTitledBorder("Find")); add(textFieldPanel, BorderLayout.NORTH); resultsList = new OWLObjectList(owlEditorKit); JPanel resultsListPanel = new JPanel(new BorderLayout()); resultsListPanel.add(ComponentFactory.createScrollPane(resultsList)); resultsListPanel.setBorder(ComponentFactory.createTitledBorder("Results")); add(resultsListPanel, BorderLayout.CENTER); textField.getDocument().addDocumentListener(new DocumentListener() { public void insertUpdate(DocumentEvent e) { update(); } public void removeUpdate(DocumentEvent e) { update(); } public void changedUpdate(DocumentEvent e) { } }); textField.addKeyListener(new KeyAdapter() { public void keyPressed(KeyEvent e) { handleKeyPressed(e); } }); }
private Component createInfoBox() { Box infoBox = new Box(BoxLayout.PAGE_AXIS); infoBox.setBorder(ComponentFactory.createTitledBorder("Plugin info")); infoBox.add(Box.createRigidArea(new Dimension(0, 10))); infoBox.add(createAuthorPanel()); infoBox.add(Box.createRigidArea(new Dimension(0, 10))); infoBox.add(createLicensePanel()); infoBox.add(Box.createRigidArea(new Dimension(0, 20))); infoBox.add(createDocPanel()); return infoBox; }
private Component createInfoBox() { Box infoBox = new Box(BoxLayout.PAGE_AXIS); infoBox.setBorder(ComponentFactory.createTitledBorder("Plugin info")); infoBox.add(Box.createRigidArea(new Dimension(0, 10))); infoBox.add(createAuthorPanel()); infoBox.add(Box.createRigidArea(new Dimension(0, 10))); infoBox.add(createLicensePanel()); infoBox.add(Box.createRigidArea(new Dimension(0, 20))); infoBox.add(createDocPanel()); return infoBox; }
@SuppressWarnings("unchecked") protected void createUI(JComponent parent) { setInstructions("Please specify the path to a file that contains an ontology. You can use the browse " + "button to show a file chooser dialog."); filePathPanel = new FilePathPanel("Please select a file", UIHelper.OWL_EXTENSIONS); filePathPanel.addChangeListener(e -> { updateFinishEnabled(); }); filePathPanel.setBorder(ComponentFactory.createTitledBorder("Path")); JList recentList = createRecentList(); JPanel recentListHolder = new JPanel(new BorderLayout()); recentListHolder.setBorder(ComponentFactory.createTitledBorder("Recent locations")); recentListHolder.add(new JScrollPane(recentList), BorderLayout.CENTER); parent.setLayout(new BorderLayout(6, 6)); parent.add(filePathPanel, BorderLayout.NORTH); parent.add(recentListHolder, BorderLayout.CENTER); parent.add(createCustomizedImportsComponent(), BorderLayout.SOUTH); }
@SuppressWarnings("unchecked") protected void createUI(JComponent parent) { setInstructions("Please specify the path to a file that contains an ontology. You can use the browse " + "button to show a file chooser dialog."); filePathPanel = new FilePathPanel("Please select a file", UIHelper.OWL_EXTENSIONS); filePathPanel.addChangeListener(e -> { updateFinishEnabled(); }); filePathPanel.setBorder(ComponentFactory.createTitledBorder("Path")); JList recentList = createRecentList(); JPanel recentListHolder = new JPanel(new BorderLayout()); recentListHolder.setBorder(ComponentFactory.createTitledBorder("Recent locations")); recentListHolder.add(new JScrollPane(recentList), BorderLayout.CENTER); parent.setLayout(new BorderLayout(6, 6)); parent.add(filePathPanel, BorderLayout.NORTH); parent.add(recentListHolder, BorderLayout.CENTER); parent.add(createCustomizedImportsComponent(), BorderLayout.SOUTH); }
@SuppressWarnings("unchecked") protected void createUI(JComponent parent) { setInstructions("Please specify the path to a file that contains an ontology. You can use the browse " + "button to show a file chooser dialog."); filePathPanel = new FilePathPanel("Please select a file", UIHelper.OWL_EXTENSIONS); filePathPanel.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { updateFinishEnabled(); } }); filePathPanel.setBorder(ComponentFactory.createTitledBorder("Path")); JList recentList = createRecentList(); JPanel recentListHolder = new JPanel(new BorderLayout()); recentListHolder.setBorder(ComponentFactory.createTitledBorder("Recent locations")); recentListHolder.add(new JScrollPane(recentList), BorderLayout.CENTER); parent.setLayout(new BorderLayout(6, 6)); parent.add(filePathPanel, BorderLayout.NORTH); parent.add(recentListHolder, BorderLayout.CENTER); parent.add(createCustomizedImportsComponent(), BorderLayout.SOUTH); }
@SuppressWarnings("unchecked") protected void createUI(JComponent parent) { setInstructions("Please specify the path to a file that contains an ontology. You can use the browse " + "button to show a file chooser dialog."); filePathPanel = new FilePathPanel("Please select a file", possibleExtensions); filePathPanel.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { updateFinishEnabled(); } }); filePathPanel.setBorder(ComponentFactory.createTitledBorder("Path")); JList recentList = createRecentList(); JPanel recentListHolder = new JPanel(new BorderLayout()); recentListHolder.setBorder(ComponentFactory.createTitledBorder("Recent locations")); recentListHolder.add(new JScrollPane(recentList), BorderLayout.CENTER); parent.setLayout(new BorderLayout(6, 6)); parent.add(filePathPanel, BorderLayout.NORTH); parent.add(recentListHolder, BorderLayout.CENTER); parent.add(createCustomizedImportsComponent(), BorderLayout.SOUTH); }
public void initialise() throws Exception { setLayout(new BorderLayout()); Box box = new Box(BoxLayout.Y_AXIS); Set<OWLAnnotationProperty> annotationProperties = new TreeSet<>(); for (OWLOntology ont : getOWLModelManager().getOntologies()) { annotationProperties.addAll(ont.getAnnotationPropertiesInSignature()); } checkBoxURIMap = new HashMap<>(); for (OWLAnnotationProperty property : annotationProperties) { JCheckBox cb = new JCheckBox(getOWLModelManager().getRendering(property), getOWLEditorKit().getWorkspace().isHiddenAnnotationURI(property.getIRI().toURI())); checkBoxURIMap.put(cb, property.getIRI().toURI()); box.add(cb); box.add(Box.createVerticalStrut(4)); cb.setOpaque(false); } JPanel holder = new JPanel(new BorderLayout()); holder.setBorder(ComponentFactory.createTitledBorder("Hidden annotation URIs")); holder.add(new JScrollPane(box)); add(holder); }
public void initialise() throws Exception { setLayout(new BorderLayout()); Box box = new Box(BoxLayout.Y_AXIS); Set<OWLAnnotationProperty> annotationProperties = new TreeSet<>(); for (OWLOntology ont : getOWLModelManager().getOntologies()) { annotationProperties.addAll(ont.getAnnotationPropertiesInSignature()); } checkBoxURIMap = new HashMap<>(); for (OWLAnnotationProperty property : annotationProperties) { JCheckBox cb = new JCheckBox(getOWLModelManager().getRendering(property), getOWLEditorKit().getWorkspace().isHiddenAnnotationURI(property.getIRI().toURI())); checkBoxURIMap.put(cb, property.getIRI().toURI()); box.add(cb); box.add(Box.createVerticalStrut(4)); cb.setOpaque(false); } JPanel holder = new JPanel(new BorderLayout()); holder.setBorder(ComponentFactory.createTitledBorder("Hidden annotation URIs")); holder.add(new JScrollPane(box)); add(holder); }
public void initialise() throws Exception { setLayout(new BorderLayout()); Box box = new Box(BoxLayout.Y_AXIS); Set<OWLAnnotationProperty> annotationProperties = new TreeSet<OWLAnnotationProperty>(); for (OWLOntology ont : getOWLModelManager().getOntologies()) { annotationProperties.addAll(ont.getAnnotationPropertiesInSignature()); } checkBoxURIMap = new HashMap<JCheckBox, URI>(); for (OWLAnnotationProperty property : annotationProperties) { JCheckBox cb = new JCheckBox(getOWLModelManager().getRendering(property), getOWLEditorKit().getWorkspace().isHiddenAnnotationURI(property.getIRI().toURI())); checkBoxURIMap.put(cb, property.getIRI().toURI()); box.add(cb); box.add(Box.createVerticalStrut(4)); cb.setOpaque(false); } JPanel holder = new JPanel(new BorderLayout()); holder.setBorder(ComponentFactory.createTitledBorder("Hidden annotation URIs")); holder.add(new JScrollPane(box)); add(holder); }
public void initialise() throws Exception { setLayout(new BorderLayout()); Box box = new Box(BoxLayout.Y_AXIS); Set<OWLAnnotationProperty> annotationProperties = new TreeSet<OWLAnnotationProperty>(); for (OWLOntology ont : getOWLModelManager().getOntologies()) { annotationProperties.addAll(ont.getAnnotationPropertiesInSignature()); } checkBoxURIMap = new HashMap<JCheckBox, URI>(); for (OWLAnnotationProperty property : annotationProperties) { JCheckBox cb = new JCheckBox(getOWLModelManager().getRendering(property), getOWLEditorKit().getWorkspace().isHiddenAnnotationURI(property.getIRI().toURI())); checkBoxURIMap.put(cb, property.getIRI().toURI()); box.add(cb); box.add(Box.createVerticalStrut(4)); cb.setOpaque(false); } JPanel holder = new JPanel(new BorderLayout()); holder.setBorder(ComponentFactory.createTitledBorder("Hidden annotation URIs")); holder.add(new JScrollPane(box)); add(holder); }
private Component createAutoUpdatePanel() { Box box = new Box(BoxLayout.Y_AXIS); box.setAlignmentX(0.0f); box.setBorder(ComponentFactory.createTitledBorder("Auto update")); checkForUpdatesAtStartupCheckBox = new JCheckBox("Automatically check for plugin updates at start up", PluginManager.getInstance().isAutoUpdateEnabled()); checkForUpdatesAtStartupCheckBox.setAlignmentX(0.0f); JButton checkForUpdatesNow = new JButton(new AbstractAction("Check for updates now") { /** * */ private static final long serialVersionUID = -1489049180196552810L; public void actionPerformed(ActionEvent e) { PluginManager.getInstance().checkForUpdates(); } }); checkForUpdatesNow.setAlignmentX(0.0f); box.add(checkForUpdatesAtStartupCheckBox); box.add(Box.createVerticalStrut(12)); box.add(checkForUpdatesNow); return box; }
private Component createAutoUpdatePanel() { Box box = new Box(BoxLayout.Y_AXIS); box.setAlignmentX(0.0f); box.setBorder(ComponentFactory.createTitledBorder("Auto update")); checkForUpdatesAtStartupCheckBox = new JCheckBox("Automatically check for plugin updates at start up", PluginManager.getInstance().isAutoUpdateEnabled()); checkForUpdatesAtStartupCheckBox.setAlignmentX(0.0f); JButton checkForUpdatesNow = new JButton(new AbstractAction("Check for updates now") { /** * */ private static final long serialVersionUID = -1489049180196552810L; public void actionPerformed(ActionEvent e) { PluginManager.getInstance().checkForUpdates(); } }); checkForUpdatesNow.setAlignmentX(0.0f); box.add(checkForUpdatesAtStartupCheckBox); box.add(Box.createVerticalStrut(12)); box.add(checkForUpdatesNow); return box; }
protected void initialiseOWLView() throws Exception { setLayout(new BorderLayout()); DLExpressivityChecker expressivityChecker = new DLExpressivityChecker(getOWLModelManager().getActiveOntologies()); namePanel = new DLNamePanel(); namePanel.setBorder(ComponentFactory.createTitledBorder("DL Expressivity")); add(namePanel, BorderLayout.NORTH); DLNameKeyPanel keyPanel = new DLNameKeyPanel(); keyPanel.setBorder(ComponentFactory.createTitledBorder("Symbol key")); add(keyPanel, BorderLayout.CENTER); setName(); getOWLModelManager().addOntologyChangeListener(listener); getOWLModelManager().addListener(modelManagerListener); addHierarchyListener(hierarchyListener); }
protected void initialiseOWLView() throws Exception { setLayout(new BorderLayout()); DLExpressivityChecker expressivityChecker = new DLExpressivityChecker(getOWLModelManager().getActiveOntologies()); namePanel = new DLNamePanel(); namePanel.setBorder(ComponentFactory.createTitledBorder("DL Expressivity")); add(namePanel, BorderLayout.NORTH); DLNameKeyPanel keyPanel = new DLNameKeyPanel(); keyPanel.setBorder(ComponentFactory.createTitledBorder("Symbol key")); add(keyPanel, BorderLayout.CENTER); setName(); getOWLModelManager().addOntologyChangeListener(listener); getOWLModelManager().addListener(modelManagerListener); addHierarchyListener(hierarchyListener); }
protected void initialiseOWLView() throws Exception { setLayout(new BorderLayout()); DLExpressivityChecker expressivityChecker = new DLExpressivityChecker(getOWLModelManager().getActiveOntologies()); namePanel = new DLNamePanel(); namePanel.setBorder(ComponentFactory.createTitledBorder("DL Expressivity")); add(namePanel, BorderLayout.NORTH); DLNameKeyPanel keyPanel = new DLNameKeyPanel(); keyPanel.setBorder(ComponentFactory.createTitledBorder("Symbol key")); add(keyPanel, BorderLayout.CENTER); setName(); getOWLModelManager().addOntologyChangeListener(listener); getOWLModelManager().addListener(modelManagerListener); addHierarchyListener(hierarchyListener); }