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

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

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

JDesktopPane.updateUI介绍

暂无

代码示例

代码示例来源:origin: magefree/mage

@Override
  public void updateUI() {
    if ("Nimbus".equals(UIManager.getLookAndFeel().getName())) {
      UIDefaults map = new UIDefaults();
      Painter painter = new Painter() {

        final Color color = null;

        @Override
        public void paint(Graphics2D g, Object c, int w, int h) {
          g.setColor(color == null ? UIManager.getDefaults().getColor("desktop") : color);
          g.fillRect(0,0,w,h);
        }
      };
      map.put("DesktopPane[Enabled].backgroundPainter", painter);
      putClientProperty("Nimbus.Overrides", map);
    }
    super.updateUI();
  }
}

代码示例来源:origin: net.sourceforge.mydoggy/mydoggy-plaf

public void updateUI() {
  desktopPane.updateUI();
}

代码示例来源:origin: net.sf.nimrod/nimrod-laf

void dodo( MouseEvent ev) {
  if ( desktopIcon != null ) { 
   desktopIcon.getDesktopPane().updateUI();
  }
 }
}

代码示例来源:origin: net.sf.nimrod/nimrod-laf

public void mouseExited( MouseEvent ev) {
 if ( frame.getDesktopPane() != null ) {
  frame.getDesktopPane().updateUI();
 }
}

代码示例来源:origin: net.sf.nimrod/nimrod-laf

public void mouseEntered( MouseEvent ev) {
  if ( frame.getDesktopPane() != null ) {
   frame.getDesktopPane().updateUI();
  }
 }
}

代码示例来源:origin: net.sf.nimrod/nimrod-laf

public void mouseReleased( MouseEvent ev) {
 if ( frame.getDesktopPane() != null ) { 
  frame.getDesktopPane().updateUI();
 }
}

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

public void updateUI() {
  if (isShowing()) setBackground(null);
  super.updateUI();
 }
}

代码示例来源:origin: net.sourceforge.ondex.apps/ovtk2

public void cmdToBar(JScrollPane scrollPane, JInternalFrame cmdFrame) {
  desktop.remove(cmdFrame);
  cmdFrame.dispose();
  scrollPane.getViewport().setMaximumSize(new Dimension(frame.getSize().width, 35));
  scrollPane.getViewport().setPreferredSize(new Dimension(frame.getSize().width, 35));
  frame.add(scrollPane, BorderLayout.PAGE_END);
  desktop.updateUI();
}

代码示例来源:origin: net.sf.nimrod/nimrod-laf

void dodo( MouseEvent ev) {
  if ( ev.getComponent() instanceof NimRODInternalFrameTitlePane ) {
   if ( frame.getDesktopPane() != null ) {
    frame.getDesktopPane().updateUI();
   }
  }
  else {
   int x = ev.getX();
   int w = frame.getWidth();
   int y = ev.getY();
   int h = frame.getHeight();
   
   if ( ( x <= 5 ) || ( x >= w - ins.right) || ( y >= h - ins.bottom ) ) {
    if ( frame.getDesktopPane() != null ) {
     frame.getDesktopPane().updateUI();
    }
   }
  }
 }
}

代码示例来源:origin: net.sf.nimrod/nimrod-laf

public void propertyChange( PropertyChangeEvent evt) {
  String prop = (String)evt.getPropertyName();
  
  if ( prop.equals( JInternalFrame.IS_SELECTED_PROPERTY) ) {
   Boolean b = (Boolean)evt.getNewValue();
   iconButton.putClientProperty( "paintActive", b);
   closeButton.putClientProperty( "paintActive", b);
   maxButton.putClientProperty( "paintActive", b);
  }
  else if ( "JInternalFrame.messageType".equals( prop)) {
   frame.repaint();
  }
  else if ( "icon".equals( prop) ) {
   iconButton.getModel().setRollover( false);
   closeButton.getModel().setRollover( false);
   maxButton.getModel().setRollover( false);
   
   ((NimRODDesktopIconUI)(frame.getDesktopIcon().getUI())).hasFocus = false;
  }
  else if ( "frameIcon".equals( prop) ) {
   if ( frame.getDesktopPane() != null ) {
    frame.getDesktopPane().updateUI();
   }
  }
  
  super.propertyChange( evt);
 }
}

相关文章