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));
}
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);
}
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);
}
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);
}
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;
}
Aggregations