public void add(T component, ViewMode viewMode, boolean scrollPane) { if(mode2Component.isEmpty()) { mode2Component.put(Optional.empty(), component); } mode2Component.put(Optional.of(viewMode), component); if (!scrollPane) { super.add(component, viewMode.getName()); } else { super.add(ComponentFactory.createScrollPane(component), viewMode.getName()); } }
public void add(T component, ViewMode viewMode, boolean scrollPane) { if(mode2Component.isEmpty()) { mode2Component.put(Optional.empty(), component); } mode2Component.put(Optional.of(viewMode), component); if (!scrollPane) { super.add(component, viewMode.getName()); } else { super.add(ComponentFactory.createScrollPane(component), viewMode.getName()); } }
private void createPopupWindow() { JScrollPane sp = ComponentFactory.createScrollPane(popupList); popupWindow = new JWindow((Window) SwingUtilities.getAncestorOfClass(Window.class, textComponent)); // popupWindow.setAlwaysOnTop(true); // this doesn't appear to work with certain Windows/java combinations popupWindow.getContentPane().setLayout(new BorderLayout()); popupWindow.getContentPane().add(sp, BorderLayout.CENTER); popupWindow.setFocusableWindowState(false); }
public OWLObjectListPanel(String message, Set<E> objects, OWLEditorKit owlEditorKit) { setLayout(new BorderLayout(7, 7)); if (message != null) { add(new JLabel("<html><body>" + message + "</body></html>"), BorderLayout.NORTH); } list = new OWLObjectList(owlEditorKit); list.setListData(objects.toArray()); add(ComponentFactory.createScrollPane(list)); }
public void initialiseOWLView() throws Exception { setLayout(new BorderLayout()); final JList list = new JList(entities.toArray()); list.setCellRenderer(getOWLEditorKit().getWorkspace().createOWLCellRenderer()); add(ComponentFactory.createScrollPane(list)); list.addListSelectionListener(e -> { if (!e.getValueIsAdjusting()) { OWLEntity selEntity = (OWLEntity) list.getSelectedValue(); getOWLWorkspace().getOWLSelectionModel().setSelectedEntity(selEntity); } }); } }
private void createPopupWindow() { JScrollPane sp = ComponentFactory.createScrollPane(popupList); popupWindow = new JWindow((Window) SwingUtilities.getAncestorOfClass(Window.class, textComponent)); // popupWindow.setAlwaysOnTop(true); // this doesn't appear to work with certain Windows/java combinations popupWindow.getContentPane().setLayout(new BorderLayout()); popupWindow.getContentPane().add(sp, BorderLayout.CENTER); popupWindow.setFocusableWindowState(false); }
public OWLObjectListPanel(String message, Set<E> objects, OWLEditorKit owlEditorKit) { setLayout(new BorderLayout(7, 7)); if (message != null) { add(new JLabel("<html><body>" + message + "</body></html>"), BorderLayout.NORTH); } list = new OWLObjectList(owlEditorKit); list.setListData(objects.toArray()); add(ComponentFactory.createScrollPane(list)); }
public OWLObjectListPanel(String message, Set<E> objects, OWLEditorKit owlEditorKit) { setLayout(new BorderLayout(7, 7)); if (message != null) { add(new JLabel("<html><body>" + message + "</body></html>"), BorderLayout.NORTH); } list = new OWLObjectList(owlEditorKit); list.setListData(objects.toArray()); add(ComponentFactory.createScrollPane(list)); }
private void createPopupWindow() { JScrollPane sp = ComponentFactory.createScrollPane(popupList); popupWindow = new JWindow((Window) SwingUtilities.getAncestorOfClass(Window.class, textComponent)); // popupWindow.setAlwaysOnTop(true); // this doesn't appear to work with certain Windows/java combinations popupWindow.getContentPane().setLayout(new BorderLayout()); popupWindow.getContentPane().add(sp, BorderLayout.CENTER); popupWindow.setFocusableWindowState(false); }
private void createPopupWindow() { JScrollPane sp = ComponentFactory.createScrollPane(popupList); popupWindow = new JWindow((Window) SwingUtilities.getAncestorOfClass(Window.class, textComponent)); // popupWindow.setAlwaysOnTop(true); // this doesn't appear to work with certain Windows/java combinations popupWindow.getContentPane().setLayout(new BorderLayout()); popupWindow.getContentPane().add(sp, BorderLayout.CENTER); popupWindow.setFocusableWindowState(false); }
protected void createUI(JComponent parent) { setInstructions("Please select an existing (pre-loaded) ontology that you want to import."); ontologyList = new OWLObjectList(getOWLEditorKit()); ontologyList.setCellRenderer(new OWLOntologyCellRenderer(getOWLEditorKit())); ontologyList.addListSelectionListener(e -> { if (!e.getValueIsAdjusting()) { updateState(); } }); parent.setLayout(new BorderLayout()); parent.add(ComponentFactory.createScrollPane(ontologyList), BorderLayout.CENTER); parent.add(createCustomizedImportsComponent(), BorderLayout.SOUTH); }
protected void initialiseOWLView() throws Exception { setLayout(new BorderLayout()); list = new OWLObjectList<>(getOWLEditorKit()); List<OWLDatatype> datatypes = getDatatypeList(); OWLDatatype[] objects = datatypes.toArray(new OWLDatatype[datatypes.size()]); list.setListData(objects); list.setSelectedIndex(0); add(ComponentFactory.createScrollPane(list)); getOWLModelManager().addOntologyChangeListener(ontologyChangeListener); getOWLModelManager().addListener(p4Listener); }
protected void initialiseOWLView() throws Exception { setLayout(new BorderLayout()); list = new OWLObjectList<OWLDatatype>(getOWLEditorKit()); list.setListData(makeDatatypeList().toArray()); list.setSelectedIndex(0); add(ComponentFactory.createScrollPane(list)); getOWLModelManager().addOntologyChangeListener(ontologyChangeListener); getOWLModelManager().addListener(p4Listener); }
protected void createUI(JComponent parent) { parent.setLayout(new BorderLayout()); setInstructions("Please select the root class"); tree = new OWLModelManagerTree<>(getOWLEditorKit(), getOWLModelManager().getOWLHierarchyManager().getOWLClassHierarchyProvider()); tree.setSelectedOWLObject(getOWLEditorKit().getWorkspace().getOWLSelectionModel().getLastSelectedClass()); parent.add(ComponentFactory.createScrollPane(tree)); }
protected void createUI(JComponent parent) { parent.setLayout(new BorderLayout()); setInstructions("Please select the root class"); tree = new OWLModelManagerTree<OWLClass>(getOWLEditorKit(), getOWLModelManager().getOWLHierarchyManager().getOWLClassHierarchyProvider()); tree.setSelectedOWLObject(getOWLEditorKit().getWorkspace().getOWLSelectionModel().getLastSelectedClass()); parent.add(ComponentFactory.createScrollPane(tree)); }
protected void createUI(JComponent parent) { parent.setLayout(new BorderLayout()); setInstructions("Please select the root class"); tree = new OWLModelManagerTree<>(getOWLEditorKit(), getOWLModelManager().getOWLHierarchyManager().getOWLClassHierarchyProvider()); tree.setSelectedOWLObject(getOWLEditorKit().getWorkspace().getOWLSelectionModel().getLastSelectedClass()); parent.add(ComponentFactory.createScrollPane(tree)); }
public void initialiseView() throws Exception { setLayout(new BorderLayout()); changeListenerMediator = new ChangeListenerMediator(); list = new OWLObjectList<>(getOWLEditorKit()); list.addListSelectionListener(selListener); reload(); setupActions(); getOWLModelManager().addOntologyChangeListener(ontChangeListener); getOWLModelManager().addListener(modelManagerListener); add(ComponentFactory.createScrollPane(list)); }
public void initialiseView() throws Exception { setLayout(new BorderLayout()); changeListenerMediator = new ChangeListenerMediator(); list = new OWLObjectList<OWLDatatype>(getOWLEditorKit()); list.addListSelectionListener(selListener); reload(); setupActions(); getOWLModelManager().addOntologyChangeListener(ontChangeListener); getOWLModelManager().addListener(modelManagerListener); add(ComponentFactory.createScrollPane(list)); }
public void initialiseView() throws Exception { setLayout(new BorderLayout()); changeListenerMediator = new ChangeListenerMediator(); list = new OWLObjectList<>(getOWLEditorKit()); list.addListSelectionListener(selListener); reload(); setupActions(); getOWLModelManager().addOntologyChangeListener(ontChangeListener); getOWLModelManager().addListener(modelManagerListener); add(ComponentFactory.createScrollPane(list)); }
public void initialiseView() throws Exception { setLayout(new BorderLayout()); changeListenerMediator = new ChangeListenerMediator(); list = new OWLObjectList<OWLDatatype>(getOWLEditorKit()); list.addListSelectionListener(selListener); reload(); setupActions(); getOWLModelManager().addOntologyChangeListener(ontChangeListener); getOWLModelManager().addListener(modelManagerListener); add(ComponentFactory.createScrollPane(list)); }