java.awt.Container.getForeground()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(121)

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

Container.getForeground介绍

暂无

代码示例

代码示例来源:origin: notzippy/JALOPY2-MAIN

/**
 * Return default foreground colour
 *
 * @return DOCUMENT ME!
 */
protected Color getDefaultColor()
{
  return getContainer().getForeground();
}

代码示例来源:origin: xyz.cofe/docking-frames-core

/**
 * Tries to find the foreground color used on this title assuming that
 * <code>set</code> was given to {@link #setForeground(Color)}.
 * @param set the expected color, can be <code>null</code>
 * @return the foreground color
 */
private Color foreground( Color set ){
  if( set != null )
    return set;
  
  Container parent = getParent();
  if( parent == null )
    return Color.BLACK;
  
  set = parent.getForeground();
  if( set != null )
    return set;
  
  return Color.BLACK;
}

代码示例来源:origin: org.opentcs.thirdparty.dockingframes/docking-frames-core

/**
 * Tries to find the foreground color used on this title assuming that
 * <code>set</code> was given to {@link #setForeground(Color)}.
 * @param set the expected color, can be <code>null</code>
 * @return the foreground color
 */
private Color foreground( Color set ){
  if( set != null )
    return set;
  
  Container parent = getParent();
  if( parent == null )
    return Color.BLACK;
  
  set = parent.getForeground();
  if( set != null )
    return set;
  
  return Color.BLACK;
}

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

Color fg=UIManager.getColor("PopupMenuSeparator.foreground");
if(bg==null) bg=getParent().getBackground();
if(fg==null) fg=getParent().getForeground();

代码示例来源:origin: org.softsmithy.lib/softsmithy-lib-swing

@Override
public Color getForeground() {
  return getStyleable().getParent() != null ? getStyleable().getParent().getForeground()
      : getStyleable().getNoneStyle().getForeground();
}

代码示例来源:origin: org.softsmithy.lib/lib-core

public Color getForeground() {
 return getStyleable().getParent() != null ? getStyleable().getParent().getForeground() :
  getStyleable().getNoneStyle().getForeground();
}

相关文章

微信公众号

最新文章

更多

Container类方法