本文整理汇总了Java中com.intellij.ui.Gray._128属性的典型用法代码示例。如果您正苦于以下问题:Java Gray._128属性的具体用法?Java Gray._128怎么用?Java Gray._128使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.intellij.ui.Gray
的用法示例。
在下文中一共展示了Gray._128属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: paintComponent
@Override
protected void paintComponent(final Graphics g) {
final Insets i = getInsets();
if (UIUtil.isUnderAquaBasedLookAndFeel() || UIUtil.isUnderDarcula()) {
if (getParent() != null) {
final JBColor col = new JBColor(Gray._128, Gray._111);
final Graphics2D g2 = (Graphics2D)g;
if (myOrientation == SwingConstants.HORIZONTAL) {
UIUtil.drawDoubleSpaceDottedLine(g2, i.top + 2, getParent().getSize().height - 2 - i.top - i.bottom, 3, col, false);
} else {
UIUtil.drawDoubleSpaceDottedLine(g2, i.left + 2, getParent().getSize().width - 2 - i.left - i.right, 3, col, true);
}
}
}
else {
g.setColor(UIUtil.getSeparatorColor());
if (getParent() != null) {
if (myOrientation == SwingConstants.HORIZONTAL) {
UIUtil.drawLine(g, 3, 2, 3, getParent().getSize().height - 2);
}
else {
UIUtil.drawLine(g, 2, 3, getParent().getSize().width - 2, 3);
}
}
}
}
示例2: makeStatusFragment
private ColoredFragment makeStatusFragment(boolean prefix) {
int style = SimpleTextAttributes.STYLE_PLAIN;
if (config.projectViewStatusBold) {
style |= SimpleTextAttributes.STYLE_BOLD;
}
if (config.projectViewStatusItalic) {
style |= SimpleTextAttributes.STYLE_ITALIC;
}
Color color = config.projectViewStatusCustomColor ? config.getProjectViewStatusColor() : Gray._128;
SimpleTextAttributes attributes = new SimpleTextAttributes(style, color);
StringBand status = getStatusText();
if (prefix) {
String statusTemp = status.toString();
status.setIndex(0);
status.append(FontUtil.spaceAndThinSpace()).append(statusTemp);
}
return new ColoredFragment(status.toString(), attributes);
}
示例3: paintMacThumb
private void paintMacThumb(Graphics g, Rectangle thumbBounds) {
if (isMacScrollbarHiddenAndXcodeLikeScrollbar()) return;
thumbBounds = getMacScrollBarBounds(thumbBounds, true);
Graphics2D g2d = (Graphics2D)g;
RenderingHints oldHints = g2d.getRenderingHints();
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
JBColor baseColor = new JBColor(new NotNullProducer<Color>() {
@NotNull
@Override
public Color produce() {
return !isDark() ? Gray._0 : Gray._128;
}
});
int arc = Math.min(thumbBounds.width, thumbBounds.height);
if (alwaysPaintThumb()) {
//noinspection UseJBColor
g2d.setColor(new Color(baseColor.getRed(), baseColor.getGreen(), baseColor.getBlue(), isDark() ? 100 : 40));
g2d.fillRoundRect(thumbBounds.x, thumbBounds.y, thumbBounds.width, thumbBounds.height, arc, arc);
//g2d.drawRoundRect(thumbBounds.x, thumbBounds.y, thumbBounds.width, thumbBounds.height, arc, arc);
}
if (!myMacScrollbarHidden) {
g2d.setColor(adjustColor(baseColor));
g2d.fillRoundRect(thumbBounds.x, thumbBounds.y, thumbBounds.width, thumbBounds.height, arc, arc);
}
g2d.setRenderingHints(oldHints);
}
示例4: paintComponent
@Override
protected void paintComponent(final Graphics g) {
final Insets i = getInsets();
if (UIUtil.isUnderAquaBasedLookAndFeel() || UIUtil.isUnderDarcula()) {
if (getParent() != null) {
final JBColor col = new JBColor(Gray._128, Gray._111);
final Graphics2D g2 = (Graphics2D)g;
if (myOrientation == SwingConstants.HORIZONTAL) {
UIUtil.drawDoubleSpaceDottedLine(g2, i.top + 2, getParent().getSize().height - 2 - i.top - i.bottom, 3, col, false);
}
else {
UIUtil.drawDoubleSpaceDottedLine(g2, i.left + 2, getParent().getSize().width - 2 - i.left - i.right, 3, col, true);
}
}
}
else {
g.setColor(UIUtil.getSeparatorColor());
if (getParent() != null) {
if (myOrientation == SwingConstants.HORIZONTAL) {
UIUtil.drawLine(g, 3, 2, 3, getParent().getSize().height - 2);
}
else {
UIUtil.drawLine(g, 2, 3, getParent().getSize().width - 2, 3);
}
}
}
}
示例5: getBackgroundColor
@NotNull
private static Color getBackgroundColor(@NotNull EditorColorsScheme scheme) {
Color color = scheme.getColor(BACKGROUND);
return color != null ? color : Gray._128;
}
示例6: getTableCellRendererComponent
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
Component orig = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
if (myPluginDescriptor != null) {
final PluginNode pluginNode = (PluginNode)myPluginDescriptor;
myNameLabel.setText(myPluginDescriptor.getName());
final Color fg = orig.getForeground();
final Color bg = orig.getBackground();
final Color grayedFg = isSelected ? fg : new JBColor(Color.DARK_GRAY, Gray._128);
myNameLabel.setForeground(fg);
myStatusLabel.setForeground(grayedFg);
myPanel.setBackground(bg);
myNameLabel.setBackground(bg);
myNameLabel.setIcon(AllIcons.Nodes.Plugin);
String category = myPluginDescriptor.getCategory();
if (category != null) {
myCategoryLabel.setText(category);
myCategoryLabel.setForeground(grayedFg);
}
final IdeaPluginDescriptor installed = PluginManager.getPlugin(pluginNode.getPluginId());
if (isDownloaded(pluginNode) || (installed != null && InstalledPluginsTableModel.wasUpdated(installed.getPluginId()))) {
if (!isSelected) myNameLabel.setForeground(FileStatus.ADDED.getColor());
myStatusLabel.setText("[Downloaded]");
myPanel.setToolTipText(IdeBundle.message("plugin.download.status.tooltip"));
myStatusLabel.setBorder(BorderFactory.createEmptyBorder(0, LEFT_MARGIN, 0, 0));
}
else if (pluginNode.getStatus() == PluginNode.STATUS_INSTALLED) {
PluginId pluginId = pluginNode.getPluginId();
final boolean hasNewerVersion = InstalledPluginsTableModel.hasNewerVersion(pluginId);
if (!isSelected) myNameLabel.setForeground(FileStatus.MODIFIED.getColor());
if (hasNewerVersion) {
if (!isSelected){
myNameLabel.setForeground(JBColor.RED);
}
myNameLabel.setIcon(AllIcons.Nodes.Pluginobsolete);
}
myStatusLabel.setText("v." + pluginNode.getInstalledVersion() + (hasNewerVersion ? (" -> " + pluginNode.getVersion()) : ""));
myStatusLabel.setBorder(BorderFactory.createEmptyBorder(0, LEFT_MARGIN, 0, 0));
}
}
return myPanel;
}
示例7: getBackgroundColor
@Nonnull
private static Color getBackgroundColor(@Nonnull EditorColorsScheme scheme) {
Color color = scheme.getColor(BACKGROUND);
return color != null ? color : Gray._128;
}