本文整理了Java中javax.swing.UIManager.getColor()
方法的一些代码示例,展示了UIManager.getColor()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。UIManager.getColor()
方法的具体详情如下:
包路径:javax.swing.UIManager
类名称:UIManager
方法名:getColor
暂无
代码示例来源:origin: stackoverflow.com
g.setColor(hazAlfa(fila));
g.fillPolygon(carp);
g.setColor(darkShadow.darker());
g.drawPolygon(carp);
carp.addPoint(0, lines[i + 1]);
carp.addPoint(0, lines[i]);
g.setColor(hazAlfa(fila + 2));
g.fillPolygon(carp);
g.setColor(darkShadow.darker());
protected void paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected) {
if (tabPane.hasFocus() && isSelected) {
g.setColor(UIManager.getColor("ScrollBar.thumbShadow"));
g.drawPolygon(shape);
代码示例来源:origin: org.netbeans.api/org-openide-awt
@Override
public void paintIcon( Component c, Graphics g, int x, int y ) {
int height = getIconHeight();
orig.paintIcon( c, g, x, y+(height-orig.getIconHeight())/2 );
arrow.paintIcon( c, g, x+GAP+orig.getIconWidth(), y+(height-arrow.getIconHeight())/2 );
if( paintRollOver ) {
Color brighter = UIManager.getColor( "controlHighlight" ); //NOI18N
Color darker = UIManager.getColor( "controlShadow" ); //NOI18N
if( null == brighter || null == darker ) {
brighter = c.getBackground().brighter();
darker = c.getBackground().darker();
}
if( null != brighter && null != darker ) {
g.setColor( brighter );
g.drawLine( x+orig.getIconWidth()+1, y,
x+orig.getIconWidth()+1, y+getIconHeight() );
g.setColor( darker );
g.drawLine( x+orig.getIconWidth()+2, y,
x+orig.getIconWidth()+2, y+getIconHeight() );
}
}
}
代码示例来源:origin: bobbylight/RSyntaxTextArea
Color c1 = UIManager.getColor("Label.disabledShadow");
Color c2 = UIManager.getColor("Label.disabledForeground");
ComponentOrientation orientation = getComponentOrientation();
int width = dim.width -= 3;
int height = dim.height -= 3;
g.setColor(c1);
g.fillRect(width-9,height-1, 3,3);
g.fillRect(width-5,height-1, 3,3);
g.fillRect(width-1,height-5, 3,3);
g.fillRect(width-1,height-9, 3,3);
g.setColor(c2);
g.fillRect(width-9,height-1, 2,2);
g.fillRect(width-5,height-1, 2,2);
g.setColor(c1);
g.fillRect(10,height-1, 3,3);
g.fillRect(6,height-1, 3,3);
代码示例来源:origin: org.netbeans.api/org-openide-awt
g.setColor(this.getBackground());
Color high = UIManager.getColor("controlLtHighlight");
Color low = UIManager.getColor("controlDkShadow");
g.setColor(this.getBackground().brighter());
g.drawLine(x, y, x, y);
g.setColor(this.getBackground().darker().darker());
g.drawLine(x + 1, y + 1, x + 1, y + 1);
代码示例来源:origin: jshiell/checkstyle-idea
@Override
public void paintComponent(final Graphics g) {
g.setColor(getBackground());
int offset = 0;
if (getIcon() != null) {
offset = getIcon().getIconWidth() + getIconTextGap();
}
g.fillRect(offset, 0, getWidth() - 1 - offset, getHeight() - 1);
if (selected) {
g.setColor(UIManager.getColor("Tree.selectionBorderColor"));
g.drawRect(offset, 0, getWidth() - 1 - offset, getHeight() - 1);
}
super.paintComponent(g);
}
代码示例来源:origin: stackoverflow.com
if (isRaisedView) {
if (isPressedView) {
init(UIManager.getColor("controlLtHighlight"),
UIManager.getColor("controlDkShadow"),
UIManager.getColor("controlShadow"),
DEFAULT_SIZE, direction);
} else {
init(UIManager.getColor("controlHighlight"),
UIManager.getColor("controlShadow"),
UIManager.getColor("control"),
DEFAULT_SIZE, direction);
init(UIManager.getColor("controlDkShadow"),
UIManager.getColor("controlLtHighlight"),
UIManager.getColor("controlShadow"),
DEFAULT_SIZE, direction);
} else {
init(UIManager.getColor("controlShadow"),
UIManager.getColor("controlHighlight"),
UIManager.getColor("control"),
DEFAULT_SIZE, direction);
int dx = size - 6;
while (y + 1 < yo + size) {
g.setColor(edge1);
g.drawLine(x, y, x + 1, y);
g.drawLine(x, y + 1, x + 1, y + 1);
代码示例来源:origin: org.netbeans.api/org-openide-awt
x += h.getIndent();
g.setColor(bg);
g.fillRect(x, 0, c.getWidth() - x, c.getHeight());
Color focus = UIManager.getColor("Tree.selectionBorderColor"); // NOI18N
x = ((h.getIcon() == null) ? 0 : (h.getIcon().getIconWidth() + h.getIconTextGap()));
g.setColor(focus);
g.drawRect(x, 0, c.getWidth() - (x + 1), c.getHeight() - 1);
代码示例来源:origin: stackoverflow.com
m_textSelectionColor = UIManager.getColor(
"Tree.selectionForeground");
m_textNonSelectionColor = UIManager.getColor(
"Tree.textForeground");
m_bkSelectionColor = UIManager.getColor(
"Tree.selectionBackground");
m_bkNonSelectionColor = UIManager.getColor(
"Tree.textBackground");
m_borderSelectionColor = UIManager.getColor(
"Tree.selectionBorderColor");
setOpaque(false);
Icon icon = getIcon();
g.setColor(bColor);
int offset = 0;
if(icon != null && getText() != null)
g.setColor(m_borderSelectionColor);
g.drawRect(offset, 0, getWidth()-1-offset, getHeight()-1);
代码示例来源:origin: org.netbeans.api/org-netbeans-swing-plaf
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) {
Color borderC = UIManager.getColor("controlDarkShadow");
g.setColor(borderC);
g.drawLine(x, y + h - 1, x + w - 1, y + h - 1);
}
代码示例来源:origin: org.netbeans.api/org-netbeans-swing-plaf
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) {
Color borderC = UIManager.getColor (LFCustoms.SCROLLPANE_BORDER_COLOR);
g.setColor(borderC);
g.drawLine(x, y + h - 1, x + w - 1, y + h - 1);
}
代码示例来源:origin: org.netbeans.api/org-netbeans-swing-plaf
@Override
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) {
Color borderC = UIManager.getColor("controlDarkShadow");
g.setColor(borderC);
g.drawLine(x, y + h - 1, x + w - 1, y + h - 1);
}
代码示例来源:origin: com.fifesoft/languagesupport
@Override
public void paintBorder(Component c, Graphics g, int x, int y,
int width, int height) {
Color color = UIManager.getColor("controlShadow");
if (color==null) {
color = SystemColor.controlShadow;
}
g.setColor(color);
g.drawLine(x,y+height-1, x+width,y+height-1);
}
代码示例来源:origin: org.netbeans.api/org-netbeans-swing-plaf
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) {
g.setColor(UIManager.getColor("InternalFrame.borderShadow")); //NOI18N
g.drawLine(x, y + h - 2, x + w - 1, y + h - 2);
g.setColor(UIManager.getColor("InternalFrame.borderDarkShadow")); //NOI18N
g.drawLine(x, y + h - 1, x + w - 1, y + h - 1);
}
代码示例来源:origin: org.netbeans.api/org-netbeans-swing-plaf
@Override
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) {
Color borderC = UIManager.getColor (LFCustoms.SCROLLPANE_BORDER_COLOR);
g.setColor(borderC);
g.drawLine(x, y + h - 1, x + w - 1, y + h - 1);
}
代码示例来源:origin: org.netbeans.api/org-netbeans-swing-plaf
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) {
Color borderC = UIManager.getColor (LFCustoms.SCROLLPANE_BORDER_COLOR);
g.setColor(borderC);
g.drawLine(x, y + h - 1, x + w - 1, y + h - 1);
}
代码示例来源:origin: com.fifesoft/autocomplete
@Override
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) {
g.setColor(UIManager.getColor("controlDkShadow"));
g.drawLine(x,y, x+w-1,y);
}
};
代码示例来源:origin: com.fifesoft/languagesupport
@Override
public void paintBorder(Component c, Graphics g, int x, int y,
int w, int h) {
g.setColor(UIManager.getColor("controlDkShadow"));
g.drawLine(x,y+h-1, x+w-1,y+h-1);
}
代码示例来源:origin: atarw/material-ui-swing
@Override
protected void paintTabBorder (Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) {
g.setColor (UIManager.getColor ("TabbedPane.borderHighlightColor"));
g.drawRect (x, y, w, h);
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-gsf
public void paintIcon (java.awt.Component c, Graphics g, int x, int y) {
g.setColor ( armed ?
UIManager.getColor ( "List.selectionForeground" ) : //NOI18N
UIManager.getColor ( "controlShadow" ) ); //NOI18N
/* int[] xPoints = new int[] {x+getIconWidth()/2, x+getIconWidth(), x};
int[] yPoints = new int[] {y, y+getIconHeight()-1, y+getIconHeight()-1};
*/
int[] xPoints = new int[]{x, x + 8, x + 4};
int[] yPoints = new int[]{y + 5, y + 5, y};
g.fillPolygon ( xPoints, yPoints, 3 );
}
}
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-mobility-svgcore
public void paintIcon (java.awt.Component c, Graphics g, int x, int y) {
g.setColor ( armed ?
UIManager.getColor ( "List.selectionForeground" ) : //NOI18N
UIManager.getColor ( "controlShadow" ) ); //NOI18N
/* int[] xPoints = new int[] {x+getIconWidth()/2, x+getIconWidth(), x};
int[] yPoints = new int[] {y, y+getIconHeight()-1, y+getIconHeight()-1};
*/
int[] xPoints = new int[]{x, x + 8, x + 4};
int[] yPoints = new int[]{y + 5, y + 5, y};
g.fillPolygon ( xPoints, yPoints, 3 );
}
}
内容来源于网络,如有侵权,请联系作者删除!