public DicomExplorer(DicomModel model) { super(BUTTON_NAME, NAME, POSITION.WEST, ExtendedMode.NORMALIZED, PluginTool.Type.EXPLORER, 20); setLayout(new BorderLayout()); setDockableWidth(180); dockable.setMaximizable(true); this.model = model == null ? new DicomModel() : model; this.selectionList = new SeriesSelectionModel(patientContainer); thumnailView.getVerticalScrollBar().setUnitIncrement(16); thumnailView.setViewportView(patientContainer); changeToolWindowAnchor(getDockable().getBaseLocation()); }
public PluginTool(String id, String toolName, POSITION defaultPosition, ExtendedMode defaultMode, Type type, int position) { // Works only if there is only one instance of pluginTool at the same time this.dockableWidth = -1; this.type = type; this.toolPosition = position; this.defaultPosition = defaultPosition; this.defaultMode = defaultMode; this.dockable = new DefaultSingleCDockable(id, null, toolName); this.dockable.setTitleText(toolName); this.dockable.setExternalizable(false); this.dockable.setMaximizable(false); this.dockable.addCDockableLocationListener(event -> { if (event.isLocationChanged()) { changeToolWindowAnchor(event.getNewLocation()); } }); }
private DefaultSingleCDockable createSingleDock(DockWindow dock) { String title = dock.getTitle(); Component component = dock.getComponent(); String id = dock.getId(); DefaultSingleCDockable dockable = new DefaultSingleCDockable(id, title, component); dockable.setCloseable(dock.isCloseable()); dockable.setExternalizable(dock.isExternalizable()); dockable.setMaximizable(dock.isMaximizable()); dockable.setMinimizable(dock.isMinimizable()); dockable.setStackable(dock.isStackable()); return dockable; }