Examples of GlassPanel


Examples of gov.nasa.arc.mct.gui.View.GlassPanel

       
        // Verify control manifestation is wrapped
        JComponent controlManifestation = manifestation.getControlManifestation();
        Assert.assertTrue(controlManifestation instanceof ControlWrapper);
        ControlWrapper controlWrapper = (ControlWrapper) controlManifestation;
        GlassPanel controlGlass = controlWrapper.getGlassPanel();
        manifestation.exitLockedState();
        Assert.assertTrue(controlGlass.getMouseListeners().length > 0);
        Assert.assertTrue(controlGlass.getKeyListeners().length > 0);
       
        // Verify that the input listeners are removed when the glass panel is turned off
        manifestation.enterLockedState();
        Assert.assertEquals(controlGlass.getMouseListeners().length, 0);
        Assert.assertEquals(controlGlass.getKeyListeners().length, 0);

        manifestation.exitLockedState();
        Graphics mockGraphics = Mockito.mock(Graphics.class);
        Rectangle rectangle = new Rectangle();
        Mockito.when(mockGraphics.getClipBounds()).thenReturn(rectangle);
        controlGlass.paintComponent(mockGraphics);
        Mockito.verify(mockGraphics).setColor(Mockito.any(Color.class));
        Mockito.verify(mockGraphics).fillRect(0, 0, 0, 0);
       
        // now check that we don't use the graphics context when we are in transparent mode
        manifestation.enterLockedState();
        Graphics mockGraphics2 = Mockito.mock(Graphics.class);
        controlGlass.paintComponent(mockGraphics2);
        Mockito.verifyNoMoreInteractions(mockGraphics2);
    }
View Full Code Here

Examples of org.gwt.mosaic.ui.client.GlassPanel

    }

    @Override
    public void dragStart() {
      if (glassPanel == null) {
        glassPanel = new GlassPanel(false);
        glassPanel.addStyleName("mosaic-GlassPanel-invisible");
      }
      RootPanel.get().add(glassPanel, 0, 0);

      super.dragStart();
View Full Code Here

Examples of org.noos.xing.mydoggy.plaf.ui.GlassPanel

                if (i / 2 == lastIndex)
                    return lastIndex;

                hidePosition(false);

                GlassPanel glassPanel = (GlassPanel) SwingUtilities.getRootPane(container).getGlassPane();
                switch (anchor) {
                    case TOP:
                    case BOTTOM:
                        container.add(new VerticalSeparatorLabel(), i + ",1,c,c");
                        layout.setColumn(i, glassPanel.getDragged().getWidth(container) + 6);
                        break;
                    case LEFT:
                    case RIGHT:
                        container.add(new HorizontalSeparatorLabel(), "1," + i + ",c,c");
                        layout.setRow(i, glassPanel.getDragged().getHeight(container) + 6);
                        break;
                }

                index = i / 2;
                break;
View Full Code Here

Examples of org.noos.xing.mydoggy.plaf.ui.GlassPanel

        initGlassPane();
    }

    protected void initGlassPane() {
        RootPaneContainer rootPaneContainer = (RootPaneContainer) anchestor;
        rootPaneContainer.setGlassPane(new GlassPanel(rootPaneContainer));
    }
View Full Code Here

Examples of org.noos.xing.mydoggy.plaf.ui.GlassPanel

                }

                hidePosition(false);

                // Insert space for dragging image at specific index.
                GlassPanel glassPanel = (GlassPanel) SwingUtilities.getRootPane(container).getGlassPane();
                switch (anchor) {
                    case TOP:
                    case BOTTOM:
                        container.add(new VerticalSeparatorLabel(), i + ",1,c,c");
                        layout.setColumn(i, glassPanel.getDraggingImage().getWidth(container) + 6);
                        break;
                    case LEFT:
                    case RIGHT:
                        container.add(new HorizontalSeparatorLabel(), "1," + i + ",c,c");
                        layout.setRow(i, glassPanel.getDraggingImage().getHeight(container) + 6);
                        break;
                }

                index = i / 2;
                if (fromUp)
View Full Code Here

Examples of org.noos.xing.mydoggy.plaf.ui.cmp.GlassPanel

        updateGhostImage(point, ghostImage);
        this.ghostImage = ghostImage;
    }

    protected void updateGhostImage(Point point, BufferedImage ghostImage) {
        GlassPanel glassPane = manager.getGlassPanel();
        glassPane.setVisible(true);
        glassPane.setPoint(SwingUtil.convertPointFromScreen(point, glassPane));
        glassPane.setDraggingImage(ghostImage);
        glassPane.repaint();
        this.updatedGhostImage = ghostImage;
    }
View Full Code Here

Examples of org.noos.xing.mydoggy.plaf.ui.cmp.GlassPanel

        glassPane.repaint();
        this.updatedGhostImage = ghostImage;
    }

    protected void updateGhostImage(Point point) {
        GlassPanel glassPane = manager.getGlassPanel();
        glassPane.setPoint(SwingUtil.convertPointFromScreen(point, glassPane));
        glassPane.repaint();
    }
View Full Code Here

Examples of org.noos.xing.mydoggy.plaf.ui.cmp.GlassPanel

        glassPane.setPoint(SwingUtil.convertPointFromScreen(point, glassPane));
        glassPane.repaint();
    }

    protected void resetGhostImage() {
        GlassPanel glassPane = manager.getGlassPanel();
        Rectangle dirtyRegion = glassPane.getRepaintRect();
        glassPane.setDraggingImage(null);
        glassPane.repaint(dirtyRegion);
    }
View Full Code Here

Examples of org.noos.xing.mydoggy.plaf.ui.cmp.GlassPanel

        glassPane.setDraggingImage(null);
        glassPane.repaint(dirtyRegion);
    }

    protected void cleanupGhostImage() {
        GlassPanel glassPane = manager.getGlassPanel();
        glassPane.setDraggingImage(null);
        glassPane.setVisible(false);
        ghostImage = null;
        SwingUtilities.getWindowAncestor(manager).repaint();
    }
View Full Code Here

Examples of org.noos.xing.mydoggy.plaf.ui.cmp.GlassPanel

        }
    }

    protected void hideAllPreview() {
        if (previewPanel != null) {
            GlassPanel glassPane = descriptor.getManager().getGlassPanel();
            glassPane.remove(previewPanel);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.