Search in sources :

Example 1 with RootPaneContainer

use of javax.swing.RootPaneContainer in project jdk8u_jdk by JetBrains.

the class FullScreenUtilities method setWindowCanFullScreen.

/**
     * Marks a {@link Window} as able to animate into or out of full screen mode.
     *
     * Only top-level {@link Window}s which are {@link RootPaneContainer}s are able to be animated into and out of full screen mode.
     * The {@link Window} must be marked as full screen-able before the native peer is created with {@link Component#addNotify()}.
     *
     * @param window
     * @param canFullScreen
     * @throws IllegalArgumentException if window is not a {@link RootPaneContainer}
     */
public static void setWindowCanFullScreen(final Window window, final boolean canFullScreen) {
    if (!(window instanceof RootPaneContainer))
        throw new IllegalArgumentException("Can't mark a non-RootPaneContainer as full screen-able");
    final RootPaneContainer rpc = (RootPaneContainer) window;
    rpc.getRootPane().putClientProperty(CPlatformWindow.WINDOW_FULLSCREENABLE, Boolean.valueOf(canFullScreen));
}
Also used : RootPaneContainer(javax.swing.RootPaneContainer)

Example 2 with RootPaneContainer

use of javax.swing.RootPaneContainer in project JWildfire by thargor6.

the class EnvelopeController method setCrosshairCursor.

private void setCrosshairCursor() {
    RootPaneContainer root = (RootPaneContainer) envelopePanel.getTopLevelAncestor();
    root.getGlassPane().setCursor(CROSSHAIR_CURSOR);
    root.getGlassPane().setVisible(true);
}
Also used : RootPaneContainer(javax.swing.RootPaneContainer)

Example 3 with RootPaneContainer

use of javax.swing.RootPaneContainer in project JWildfire by thargor6.

the class EnvelopeDlgController method setCrosshairCursor.

private void setCrosshairCursor() {
    RootPaneContainer root = (RootPaneContainer) envelopePanel.getTopLevelAncestor();
    root.getGlassPane().setCursor(CROSSHAIR_CURSOR);
    root.getGlassPane().setVisible(true);
}
Also used : RootPaneContainer(javax.swing.RootPaneContainer)

Example 4 with RootPaneContainer

use of javax.swing.RootPaneContainer in project JWildfire by thargor6.

the class EnvelopeDlgController method clearCrosshairCursor.

private void clearCrosshairCursor() {
    RootPaneContainer root = (RootPaneContainer) envelopePanel.getTopLevelAncestor();
    root.getGlassPane().setCursor(DEFAULT_CURSOR);
    root.getGlassPane().setVisible(false);
}
Also used : RootPaneContainer(javax.swing.RootPaneContainer)

Example 5 with RootPaneContainer

use of javax.swing.RootPaneContainer in project cytoscape-impl by cytoscape.

the class DingRenderingEngineFactory method createRenderingEngine.

/**
 * Render given view model by Ding rendering engine.
 */
@Override
public RenderingEngine<CyNetwork> createRenderingEngine(final Object presentationContainer, final View<CyNetwork> view) {
    // Validate arguments
    if (presentationContainer == null)
        throw new IllegalArgumentException("Container is null.");
    if (view == null)
        throw new IllegalArgumentException("Cannot create presentation for null view model.");
    if (view instanceof CyNetworkView == false)
        throw new IllegalArgumentException("Ding accepts CyNetworkView only.");
    final CyNetworkView targetView = (CyNetworkView) view;
    DGraphView dgv = null;
    if (presentationContainer instanceof JComponent || presentationContainer instanceof RootPaneContainer) {
        if (view instanceof DGraphView) {
            dgv = (DGraphView) view;
        } else {
            dgv = new DGraphView(targetView, dingLexicon, vtfListener, annMgr, dingGraphLOD, handleFactory, registrar);
            dgv.registerServices();
        }
        if (presentationContainer instanceof RootPaneContainer) {
            final RootPaneContainer container = (RootPaneContainer) presentationContainer;
            final InternalFrameComponent ifComp = new InternalFrameComponent(container.getLayeredPane(), dgv);
            container.setContentPane(ifComp);
        } else {
            final JComponent component = (JComponent) presentationContainer;
            component.setLayout(new BorderLayout());
            component.add(dgv.getComponent(), BorderLayout.CENTER);
        }
    } else {
        throw new IllegalArgumentException("frame object is not of type JComponent or RootPaneContainer, which is invalid for this implementation of PresentationFactory");
    }
    return dgv;
}
Also used : BorderLayout(java.awt.BorderLayout) JComponent(javax.swing.JComponent) RootPaneContainer(javax.swing.RootPaneContainer) CyNetworkView(org.cytoscape.view.model.CyNetworkView)

Aggregations

RootPaneContainer (javax.swing.RootPaneContainer)25 Component (java.awt.Component)5 Window (java.awt.Window)5 Controller (org.freeplane.features.mode.Controller)4 JComponent (javax.swing.JComponent)3 ResourceController (org.freeplane.core.resources.ResourceController)3 IconController (org.freeplane.features.icon.IconController)3 MIconController (org.freeplane.features.icon.mindmapmode.MIconController)3 LinkController (org.freeplane.features.link.LinkController)3 MLinkController (org.freeplane.features.link.mindmapmode.MLinkController)3 MapController (org.freeplane.features.map.MapController)3 MMapController (org.freeplane.features.map.mindmapmode.MMapController)3 MModeController (org.freeplane.features.mode.mindmapmode.MModeController)3 NodeStyleController (org.freeplane.features.nodestyle.NodeStyleController)3 MNodeStyleController (org.freeplane.features.nodestyle.mindmapmode.MNodeStyleController)3 LogicalStyleController (org.freeplane.features.styles.LogicalStyleController)3 ViewController (org.freeplane.features.ui.ViewController)3 Container (java.awt.Container)2 Cursor (java.awt.Cursor)2 ImageIcon (javax.swing.ImageIcon)2