javax.swing.JDesktopPane.getDesktopManager()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(7.0k)|赞(0)|评价(0)|浏览(101)

本文整理了Java中javax.swing.JDesktopPane.getDesktopManager()方法的一些代码示例,展示了JDesktopPane.getDesktopManager()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JDesktopPane.getDesktopManager()方法的具体详情如下:
包路径:javax.swing.JDesktopPane
类名称:JDesktopPane
方法名:getDesktopManager

JDesktopPane.getDesktopManager介绍

暂无

代码示例

代码示例来源:origin: chewiebug/GCViewer

public void actionPerformed(final ActionEvent e) {
    final JInternalFrame[] frames = gcViewer.getDesktopPane().getAllFrames();
    final DesktopManager desktopManager = gcViewer.getDesktopPane().getDesktopManager();
    for (int i=0; i<frames.length; i++) {
      final JInternalFrame frame = frames[i];
      desktopManager.deiconifyFrame(frame);
      try {
        frame.setMaximum(false);
      } 
      catch (PropertyVetoException e1) {
        e1.printStackTrace();
      }
      final int height = gcViewer.getDesktopPane().getHeight()/frames.length;
      desktopManager.setBoundsForFrame(frame, 0, height * i, gcViewer.getDesktopPane().getWidth(), height);
    }
  }
}

代码示例来源:origin: stackoverflow.com

JDesktopPane desktop;
DesktopManager mgr = desktop.getDesktopManager();
mgr.iconifyFrame(frame);

代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu

DesktopManager getManager(JInternalFrame _f)
{
 DesktopManager r=null;
 JDesktopPane   d=_f.getDesktopPane();
 if(d!=null) r=d.getDesktopManager();
 return r;
}

代码示例来源:origin: khuxtable/seaglass

protected void uninstallDesktopManager() {
  if (oldDesktopManager != null && !(oldDesktopManager instanceof UIResource)) {
    desktopManager = desktop.getDesktopManager();
    if (desktopManager == null || desktopManager instanceof UIResource) {
      desktop.setDesktopManager(oldDesktopManager);
    }
  }
  oldDesktopManager = null;
  super.uninstallDesktopManager();
}

代码示例来源:origin: stackoverflow.com

public Demo() {
    JFrame frame = new JFrame();
    frame.setSize(300,300);
    JDesktopPane df = new JDesktopPane();
    DesktopManager dm = df.getDesktopManager();
    df.setDesktopManager(new DefaultDesktopManager(){
        public void dragFrame(JComponent f, int newX, int newY) {
         super.dragFrame(f, newX, 5);
        }

    });
    JInternalFrame jif = new JInternalFrame("test ");
    jif.setLocation(5, 5);
    jif.setSize(150,100);
    jif.setVisible(true);
    df.add(jif);
    frame.setContentPane(df);
    frame.setVisible(true);
}

代码示例来源:origin: khuxtable/seaglass

protected void installDesktopManager() {
  if (UIManager.getBoolean("InternalFrame.useTaskBar")) {
    desktopManager = oldDesktopManager = desktop.getDesktopManager();
    if (!(desktopManager instanceof SeaGlassDesktopManager)) {
      desktopManager = new SeaGlassDesktopManager();
      desktop.setDesktopManager(desktopManager);
    }
  } else {
    super.installDesktopManager();
  }
}

代码示例来源:origin: stackoverflow.com

desktop.add(f);
f.setVisible(true);
desktop.getDesktopManager().maximizeFrame(f);

代码示例来源:origin: org.fudaa.framework.ebli/ebli-common

public void drop(final DropTargetDropEvent _dtde) {
 if (FuLog.isDebug()) {
  FuLog.debug("EBD: dndDrop");
 }
 getDesktopPane().getDesktopManager().deactivateFrame(this);
 try {
  setSelected(false);
 } catch (final java.beans.PropertyVetoException ex) {}
}

代码示例来源:origin: org.fudaa.framework.ebli/ebli-common

public void dragEnter(final DropTargetDragEvent _dtde) {
 _dtde.rejectDrag();
 if (FuLog.isDebug()) {
  FuLog.debug("EBD: dndEnter");
 }
 getDesktopPane().getDesktopManager().activateFrame(this);
 try {
  setSelected(true);
 } catch (final java.beans.PropertyVetoException ex) {}
}

代码示例来源:origin: com.github.houbie/rhino-mod

} else if (cmd.equals("Console")) {
  if (console.isIcon()) {
    desk.getDesktopManager().deiconifyFrame(console);
  desk.getDesktopManager().activateFrame(console);
  console.consoleTextArea.requestFocus();
} else if (cmd.equals("Cut")) {
      } catch (Exception exc) {
      desk.getDesktopManager().setBoundsForFrame(f, x, y,
                            w, h);
      x += w;
    w = dimen.width;
    h = dimen.height;
    desk.getDesktopManager().setBoundsForFrame(f, x, y, w, h);

代码示例来源:origin: org.jvnet.hudson/embedded-rhino-debugger

} else if (cmd.equals("Console")) {
  if (console.isIcon()) {
    desk.getDesktopManager().deiconifyFrame(console);
  desk.getDesktopManager().activateFrame(console);
  console.consoleTextArea.requestFocus();
} else if (cmd.equals("Cut")) {
      } catch (Exception exc) {
      desk.getDesktopManager().setBoundsForFrame(f, x, y,
                            w, h);
      x += w;
    w = dimen.width;
    h = dimen.height;
    desk.getDesktopManager().setBoundsForFrame(f, x, y, w, h);

代码示例来源:origin: com.github.tntim96/rhino

} else if (cmd.equals("Console")) {
  if (console.isIcon()) {
    desk.getDesktopManager().deiconifyFrame(console);
  desk.getDesktopManager().activateFrame(console);
  console.consoleTextArea.requestFocus();
} else if (cmd.equals("Cut")) {
      } catch (Exception exc) {
      desk.getDesktopManager().setBoundsForFrame(f, x, y,
                            w, h);
      x += w;
    w = dimen.width;
    h = dimen.height;
    desk.getDesktopManager().setBoundsForFrame(f, x, y, w, h);

代码示例来源:origin: ro.isdc.wro4j/rhino

} else if (cmd.equals("Console")) {
  if (console.isIcon()) {
    desk.getDesktopManager().deiconifyFrame(console);
  desk.getDesktopManager().activateFrame(console);
  console.consoleTextArea.requestFocus();
} else if (cmd.equals("Cut")) {
      } catch (Exception exc) {
      desk.getDesktopManager().setBoundsForFrame(f, x, y,
                            w, h);
      x += w;
    w = dimen.width;
    h = dimen.height;
    desk.getDesktopManager().setBoundsForFrame(f, x, y, w, h);

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/skinlf

/**
 * Sets the Shaded attribute of the InternalFrameWindow object
 * 
 * @param b The new Shaded value
 */
public void setShaded(boolean b) {
 if (b == shaded) { return; }
 if (b == true) {
  Rectangle bounds = frame.getBounds();
  Rectangle p = new Rectangle(bounds.x, bounds.y, bounds.width,
    bounds.height);
  frame.putClientProperty(SHADE_BOUNDS_PROPERTY, p);
  frame.setBounds(p.x, p.y, p.width, frame.getMinimumSize().height - 2);
 } else {
  Point location = frame.getLocation();
  Rectangle p = (Rectangle)frame.getClientProperty(SHADE_BOUNDS_PROPERTY);
  frame.getDesktopPane().getDesktopManager().setBoundsForFrame(frame,
    location.x, location.y, p.width, p.height);
  frame.putClientProperty(SHADE_BOUNDS_PROPERTY, null);
 }
 shaded = b;
}

代码示例来源:origin: org.jvnet.hudson/embedded-rhino-debugger

desk.getDesktopManager().deiconifyFrame(w);
desk.getDesktopManager().activateFrame(w);
try {
  w.show();

代码示例来源:origin: ro.isdc.wro4j/rhino

desk.getDesktopManager().deiconifyFrame(w);
desk.getDesktopManager().activateFrame(w);
try {
  w.show();

代码示例来源:origin: com.github.houbie/rhino-mod

desk.getDesktopManager().deiconifyFrame(w);
desk.getDesktopManager().activateFrame(w);
try {
  w.show();

代码示例来源:origin: com.github.tntim96/rhino

desk.getDesktopManager().deiconifyFrame(w);
desk.getDesktopManager().activateFrame(w);
try {
  w.show();

代码示例来源:origin: com.eas.platypus/platypus-js-scalable-widget

if (lif != null && lif.getDesktopPane() != null) {
  ldp = lif.getDesktopPane();
  ldm = ldp.getDesktopManager();
} else {
  ldi = iifDesktopIcon(dragTarget);
  if (ldi != null && ldi.getDesktopPane() != null) {
    ldp = ldi.getDesktopPane();
    ldm = ldp.getDesktopManager();

代码示例来源:origin: com.mgmtp.gcviewer/gcviewer

public void actionPerformed(final ActionEvent e) {
    final JInternalFrame[] frames = gcViewer.getDesktopPane().getAllFrames();
    final DesktopManager desktopManager = gcViewer.getDesktopPane().getDesktopManager();
    for (int i=0; i<frames.length; i++) {
      final JInternalFrame frame = frames[i];
      desktopManager.deiconifyFrame(frame);
      try {
        frame.setMaximum(false);
      } catch (PropertyVetoException e1) {
        e1.printStackTrace();
      }
      final int height = gcViewer.getDesktopPane().getHeight()/frames.length;
      desktopManager.setBoundsForFrame(frame, 0, height * i, gcViewer.getDesktopPane().getWidth(), height);
    }
  }
}

相关文章