@SuppressWarnings("unchecked") public void locationChanged(EditorLocation<T> location) { if (location != null) { for (Inspector inspector : inspectorPanel.getInspectors()) { ((EditorInspector<T>) inspector).locationChanged(location); } } }
public void release() { for (EditorView<T> view : views) { view.release(); view.removePropertyChangeListener(this); } views.clear(); inputTabs.removeChangeListener(inputTabsChangeListener); inputTabs.removeAll(); inspectorPanel.release(); document.release(); }
public Editor(T document) { super(new BorderLayout()); this.document = document; setBackground(Color.LIGHT_GRAY); inputTabs = new JTabbedPane(JTabbedPane.LEFT, JTabbedPane.SCROLL_TAB_LAYOUT); inputTabs.setUI(new VerticalTabbedPaneUI()); inputTabs.setFont(inputTabs.getFont().deriveFont(8)); inputTabsChangeListener = new InputTabsChangeListener(); inputTabs.addChangeListener(inputTabsChangeListener); inspectorPanel = JInspectorPanelFactory.build(inputTabs); add(inspectorPanel.getComponent(), BorderLayout.CENTER); }
public void addInspector(EditorInspector<T> inspector) { inspectorPanel.addInspector(inspector); inspectorPanel.setInspectorVisible( inspector, currentView == null ? true : inspector.isEnabledFor(currentView)); }
public Inspector getInspector(String inspectorId) { return inspectorPanel.getInspector(inspectorId); }