@Test public void testCreatePanel() { final MindMapPanelConfig config = new MindMapPanelConfig(); final MindMapPanelController controller = mock(MindMapPanelController.class); when(controller.provideConfigForMindMapPanel(any(MindMapPanel.class))).thenReturn(config); final MindMapPanel panel = new MindMapPanel(controller); assertNotSame(config, panel.getConfiguration()); }
@Nonnull public MindMapPanelConfig getConfiguration() { this.lock(); try { return this.config; } finally { this.unlock(); } }
MindMapPanel extends JComponent implements ClipboardOwner { @Nonnull public MindMapPanelConfig getConfiguration() { this.lock(); try { return this.config; } finally { this.unlock(); } } }
MindMapPanel extends JComponent implements ClipboardOwner { @Nonnull public MindMapPanelConfig getConfiguration() { this.lock(); try { return this.config; } finally { this.unlock(); } } MindMapPanel(@Nonnull final MindMapPanelController controller); }
MindMapPanel extends JComponent implements ClipboardOwner { @Nonnull public MindMapPanelConfig getConfiguration() { this.lock(); try { return this.config; } finally { this.unlock(); } } MindMapPanel(@Nonnull final MindMapPanelController controller); @Nonnull UUID getUuid(); static void drawOnGraphicsForConfiguration(@Nonnull final MMGraphics g, @Nonnull final MindMapPanelConfig config, @Nonnull final MindMap map, final boolean drawSelection, @Nullable @MustNotContainNull final List<Topic> selectedTopics); static boolean calculateElementSizes(@Nonnull final MMGraphics gfx, @Nullable final MindMap model, @Nonnull final MindMapPanelConfig cfg); @Nullable static Dimension2D layoutModelElements(@Nullable final MindMap model, @Nonnull final MindMapPanelConfig cfg); @Nullable static Dimension layoutFullDiagramWithCenteringToPaper(@Nonnull final MMGraphics gfx, @Nonnull final MindMap map, @Nonnull final MindMapPanelConfig cfg, @Nonnull final Dimension2D paperSize); @Nullable static Dimension2D calculateSizeOfMapInPixels(@Nonnull final MindMap model, @Nullable final Graphics2D graphicsContext, @Nonnull final MindMapPanelConfig cfg, final boolean expandAll, @Nonnull final RenderQuality quality); @Nullable static BufferedImage renderMindMapAsImage(@Nonnull final MindMap model, @Nonnull final MindMapPanelConfig cfg, final boolean expandAll, @Nonnull final RenderQuality quality); @Nullable T getSessionObject(@Nonnull final String key, @Nonnull final Class<T> klazz, @Nullable final T def); void putSessionObject(@Nonnull final String key, @Nullable final Object obj); @Nullable Object findTmpObject(@Nonnull final Object key); void putTmpObject(@Nonnull final Object key, @Nullable final Object value); void refreshConfiguration(); void executeModelJobs(@Nonnull @MustNotContainNull final ModelJob... jobs); boolean isShowJumps(); void setShowJumps(final boolean flag); void makeNewChildAndStartEdit(@Nullable final Topic parent, @Nullable final Topic baseTopic); void deleteTopics(final boolean force, @Nonnull @MustNotContainNull final Topic... topics); void collapseOrExpandAll(final boolean collapse); @Nullable Topic deleteSelectedTopics(final boolean force); boolean hasSelectedTopics(); boolean hasOnlyTopicSelected(); void removeFromSelection(@Nonnull final Topic t); void select(@Nullable final Topic t, final boolean removeIfPresented); @Nonnull @MustNotContainNull Topic[] getSelectedTopics(); void updateEditorAfterResizing(); void hideEditor(); boolean endEdit(final boolean commit); void startEdit(@Nullable final AbstractElement element); void addMindMapListener(@Nonnull final MindMapListener l); void removeMindMapListener(@Nonnull final MindMapListener l); void setModel(@Nonnull final MindMap model, final boolean notifyModelChangeListeners); @Override boolean isFocusable(); @Nonnull MindMap getModel(); void setModel(@Nonnull final MindMap model); double getScale(); void setScale(final double zoom, final boolean notifyListeners); @Override @Nonnull Dimension getPreferredSize(); @Override @Nonnull Dimension getMinimumSize(); @Override void doLayout(); boolean updateElementsAndSizeForGraphics(@Nullable final Graphics2D graph, final boolean forceLayout, final boolean doListenerNotification); boolean updateElementsAndSizeForCurrentGraphics(final boolean enforce, final boolean doListenerNotification); @Nullable String getErrorText(); void setErrorText(@Nullable final String text); @Override boolean isValid(); @Override boolean isValidateRoot(); @Override void invalidate(); @Override @SuppressWarnings("unchecked") void paintComponent(@Nonnull final Graphics g); @Nullable AbstractElement findTopicUnderPoint(@Nonnull final Point point); void removeAllSelection(); void focusTo(@Nullable final Topic theTopic); boolean cloneTopic(@Nullable final Topic topic); boolean cloneTopic(@Nullable final Topic topic, final boolean cloneSubtree); @Nonnull MindMapPanelConfig getConfiguration(); @Nonnull MindMapPanelController getController(); @Nullable Topic getFirstSelected(); boolean isLocked(); boolean lockIfNotDisposed(); @Nonnull MindMapPanel lock(); void unlock(); @Override void lostOwnership(@Nonnull final Clipboard clipboard, @Nonnull final Transferable contents); boolean copyTopicsToClipboard(final boolean cut, @Nonnull @MustNotContainNull final Topic... topics); boolean pasteTopicsFromClipboard(); boolean isDisposed(); void dispose(); void doNotifyModelChanged(final boolean addToHistory); }
MindMapPanel extends JComponent implements ClipboardOwner { @Nonnull public MindMapPanelConfig getConfiguration() { this.lock(); try { return this.config; } finally { this.unlock(); } } MindMapPanel(@Nonnull final MindMapPanelController controller); @Nonnull UUID getUuid(); static void drawOnGraphicsForConfiguration(@Nonnull final MMGraphics g, @Nonnull final MindMapPanelConfig config, @Nonnull final MindMap map, final boolean drawSelection, @Nullable @MustNotContainNull final List<Topic> selectedTopics); static boolean calculateElementSizes(@Nonnull final MMGraphics gfx, @Nullable final MindMap model, @Nonnull final MindMapPanelConfig cfg); @Nullable static Dimension2D layoutModelElements(@Nullable final MindMap model, @Nonnull final MindMapPanelConfig cfg); @Nullable static Dimension layoutFullDiagramWithCenteringToPaper(@Nonnull final MMGraphics gfx, @Nonnull final MindMap map, @Nonnull final MindMapPanelConfig cfg, @Nonnull final Dimension2D paperSize); @Nullable static Dimension2D calculateSizeOfMapInPixels(@Nonnull final MindMap model, @Nullable final Graphics2D graphicsContext, @Nonnull final MindMapPanelConfig cfg, final boolean expandAll, @Nonnull final RenderQuality quality); @Nullable static BufferedImage renderMindMapAsImage(@Nonnull final MindMap model, @Nonnull final MindMapPanelConfig cfg, final boolean expandAll, @Nonnull final RenderQuality quality); @Nullable T getSessionObject(@Nonnull final String key, @Nonnull final Class<T> klazz, @Nullable final T def); void putSessionObject(@Nonnull final String key, @Nullable final Object obj); @Nullable Object findTmpObject(@Nonnull final Object key); void putTmpObject(@Nonnull final Object key, @Nullable final Object value); void refreshConfiguration(); void executeModelJobs(@Nonnull @MustNotContainNull final ModelJob... jobs); boolean isShowJumps(); void setShowJumps(final boolean flag); void makeNewChildAndStartEdit(@Nullable final Topic parent, @Nullable final Topic baseTopic); void deleteTopics(final boolean force, @Nonnull @MustNotContainNull final Topic... topics); void collapseOrExpandAll(final boolean collapse); @Nullable Topic deleteSelectedTopics(final boolean force); boolean hasSelectedTopics(); boolean hasOnlyTopicSelected(); void removeFromSelection(@Nonnull final Topic t); void select(@Nullable final Topic t, final boolean removeIfPresented); @Nonnull @MustNotContainNull Topic[] getSelectedTopics(); void updateEditorAfterResizing(); void hideEditor(); boolean endEdit(final boolean commit); void startEdit(@Nullable final AbstractElement element); void addMindMapListener(@Nonnull final MindMapListener l); void removeMindMapListener(@Nonnull final MindMapListener l); void setModel(@Nonnull final MindMap model, final boolean notifyModelChangeListeners); @Override boolean isFocusable(); @Nonnull MindMap getModel(); void setModel(@Nonnull final MindMap model); double getScale(); void setScale(final double zoom, final boolean notifyListeners); @Override @Nonnull Dimension getPreferredSize(); @Override @Nonnull Dimension getMinimumSize(); @Override void doLayout(); boolean updateElementsAndSizeForGraphics(@Nullable final Graphics2D graph, final boolean forceLayout, final boolean doListenerNotification); boolean updateElementsAndSizeForCurrentGraphics(final boolean enforce, final boolean doListenerNotification); @Nullable String getErrorText(); void setErrorText(@Nullable final String text); @Override boolean isValid(); @Override boolean isValidateRoot(); @Override void invalidate(); @Override @SuppressWarnings("unchecked") void paintComponent(@Nonnull final Graphics g); @Nullable AbstractElement findTopicUnderPoint(@Nonnull final Point point); void removeAllSelection(); void focusTo(@Nullable final Topic theTopic); boolean cloneTopic(@Nullable final Topic topic); boolean cloneTopic(@Nullable final Topic topic, final boolean cloneSubtree); @Nonnull MindMapPanelConfig getConfiguration(); @Nonnull MindMapPanelController getController(); @Nullable Topic getFirstSelected(); boolean isLocked(); boolean lockIfNotDisposed(); @Nonnull MindMapPanel lock(); void unlock(); @Override void lostOwnership(@Nonnull final Clipboard clipboard, @Nonnull final Transferable contents); boolean copyTopicsToClipboard(final boolean cut, @Nonnull @MustNotContainNull final Topic... topics); boolean pasteTopicsFromClipboard(); boolean isDisposed(); void dispose(); void doNotifyModelChanged(final boolean addToHistory); static final long serialVersionUID; static final String ATTR_SHOW_JUMPS; }