Exemple #1
0
  public void maxVncViewPanel(VncViewPanel panel) throws Exception {
    log.info("maxVncViewPanel");
    MaxVncPanelWindow component = ViewManager.getComponent(MaxVncPanelWindow.class);
    component.setAlwaysOnTop(true);

    Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
    component.setSize(screenSize);
    component.setLocation(0, 0);
    component.getCenterPanel().removeAll();
    Dimension topPanelSize = panel.getTopPanel().getSize();
    panel
        .getDesktopScrollPane()
        .setSize(screenSize.width + 1, screenSize.height - topPanelSize.height - 4);

    component.getCenterPanel().add(panel, BorderLayout.CENTER);
    component.setVncViewPanel(panel);
    component.setVisible(true);
    panel.getDesktopScrollPane().getComponent(0).repaint();

    panel.getMaxViewButton().setVisible(false);
    panel.getRevertViewButton().setVisible(true);
  }