Java 8 JRootPane - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 JRootPane class.

This code example shows how to use the following methods:setSize, setContentPane
            true, new JScrollPane(), glCanvas1);
        verticalSplitPane.setResizeWeight(0.5);
        final JSplitPane horizontalSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,
            true, new JScrollPane(), verticalSplitPane);
        horizontalSplitPane.setResizeWeight(0.5);
        final JRootPane intermediateRootPane = new JRootPane();
        intermediateRootPane.setContentPane(horizontalSplitPane);
        intermediateRootPane.setSize(640, 480);
        this.add(intermediateRootPane);
        System.err.println("GearsApplet: init() - end [visible "+isVisible()+", displayable "+isDisplayable()+"] - "+currentThreadName());
    } 
 
    String currentThreadName() {
        return Thread.currentThread().getName();
    } 
 
    @Override 
    public void start() { 
        System.err.println("GearsApplet: start() - begin [visible "+isVisible()+", displayable "+isDisplayable()+"] - "+currentThreadName());
        animator.start();
6
CodeRank
This code example shows how to use the following methods:registerKeyboardAction
This code example shows how to use the following methods:getBounds, getInsets, getContentPane, getGlassPane, getJMenuBar
 
    @Override 
    public void layoutContainer(Container parent) {
        JRootPane rootPane = (JRootPane) parent;
//        hideMenu(rootPane); 
        Rectangle bounds = rootPane.getBounds();
        Insets insets = rootPane.getInsets();
        int y = insets.top;
        int x = insets.left;
        int w = bounds.width - insets.right - insets.left;
        int h = bounds.height - insets.top - insets.bottom;
 
        if (rootPane.getLayeredPane() != null) {
            rootPane.getLayeredPane().setBounds(x, y, w, h);
        } 
 
        if (rootPane.getGlassPane() != null) {
            rootPane.getGlassPane().setBounds(x, y, w, h);
        } 
 

6
CodeRank
This code example shows how to use the following methods:setContentPane
            true, new JScrollPane(), glCanvas1);
        verticalSplitPane.setResizeWeight(0.5);
        final JSplitPane horizontalSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,
            true, new JScrollPane(), verticalSplitPane);
        horizontalSplitPane.setResizeWeight(0.5);
        final JRootPane intermediateRootPane = new JRootPane();
        intermediateRootPane.setContentPane(horizontalSplitPane);
        add(intermediateRootPane, BorderLayout.CENTER);
        System.err.println("GearsApplet: init() - end [visible "+isVisible()+", displayable "+isDisplayable()+"] - "+currentThreadName());
    } 
 
    String currentThreadName() {
        return Thread.currentThread().getName();
    } 
 
    @Override 
    public void start() { 
        System.err.println("GearsApplet: start() - begin [visible "+isVisible()+", displayable "+isDisplayable()+"] - "+currentThreadName());
        animator.start();
        animator.setUpdateFPSFrames(60, System.err);
5
CodeRank
This code example shows how to use the following methods:getActionMap, getInputMap
    public EscapeDialog(final Frame owner) {
        super(owner, true);
    } 
 
    protected JRootPane createRootPane() {
        final JRootPane rootPane = new JRootPane();
        final KeyStroke stroke = KeyStroke.getKeyStroke("ESCAPE");
 
        final Action actionListener = new AbstractAction() {
             
            public void actionPerformed(final ActionEvent actionEvent) {
                setVisible(false);
            } 
             
        }; 
 
        final InputMap inputMap = rootPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
        inputMap.put(stroke, "ESCAPE");
        rootPane.getActionMap().put("ESCAPE", actionListener);
 

5
CodeRank
This code example shows how to use the following methods:isValid, putClientProperty
     * @param rootPane 
     */ 
    public static void makeWindowLeopardStyle(JRootPane rootPane) {
        // TODO figure out correct way to determine if the JRootPane has been 
        // TODO realized. 
        if (rootPane.isValid()) {
            throw new IllegalArgumentException("This method only works if the" +
                    "given JRootPane has not yet been realized."); 
        } 
 
        rootPane.putClientProperty("apple.awt.brushMetalLook", Boolean.TRUE);
    } 
 
    /** 
     * {@code true} if the Unified Tool Bar, Preference Tool Bar or Bottom Bar backgrounds should 
     * be manually painted in code, rather than letting Mac OS X do the painting. This will always 
     * return true on platforms other than Mac, and will sometimes return true on Mac's due to 
     * painting bugs in the Java distrobution. 
     */ 
    public static boolean shouldManuallyPaintTexturedWindowBackground() { 
5
CodeRank
This code example shows how to use the following methods:getRootPane, getJMenuBar
This code example shows how to use the following methods:getActionMap, getInputMap
This code example shows how to use the following methods:getRootPane, getJMenuBar
This code example shows how to use the following methods:registerKeyboardAction
See Code Examples for Java 8 JRootPane Methods: