Exemple #1
0
 @SuppressWarnings("unchecked")
 public void locationChanged(EditorLocation<T> location) {
   if (location != null) {
     for (Inspector inspector : inspectorPanel.getInspectors()) {
       ((EditorInspector<T>) inspector).locationChanged(location);
     }
   }
 }
Exemple #2
0
  public void release() {
    for (EditorView<T> view : views) {
      view.release();
      view.removePropertyChangeListener(this);
    }

    views.clear();

    inputTabs.removeChangeListener(inputTabsChangeListener);
    inputTabs.removeAll();

    inspectorPanel.release();
    document.release();
  }
Exemple #3
0
  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);
  }
Exemple #4
0
 public void addInspector(EditorInspector<T> inspector) {
   inspectorPanel.addInspector(inspector);
   inspectorPanel.setInspectorVisible(
       inspector, currentView == null ? true : inspector.isEnabledFor(currentView));
 }
Exemple #5
0
 public Inspector getInspector(String inspectorId) {
   return inspectorPanel.getInspector(inspectorId);
 }