當前位置: 首頁>>代碼示例>>Java>>正文


Java UIUtil.getTableForeground方法代碼示例

本文整理匯總了Java中com.intellij.util.ui.UIUtil.getTableForeground方法的典型用法代碼示例。如果您正苦於以下問題:Java UIUtil.getTableForeground方法的具體用法?Java UIUtil.getTableForeground怎麽用?Java UIUtil.getTableForeground使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.intellij.util.ui.UIUtil的用法示例。


在下文中一共展示了UIUtil.getTableForeground方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getTreeCellRendererComponent

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@NotNull
@Override
public Component getTreeCellRendererComponent(@NotNull JTree tree,
                                              Object value,
                                              boolean selected,
                                              boolean expanded,
                                              boolean leaf,
                                              int row,
                                              boolean hasFocus) {
  if (value instanceof MyTreeNode) {
    MyTreeNode node = (MyTreeNode)value;
    myLabel.setText(getRenamedTitle(node.getKey().field.getName(), node.getText()));
    myLabel.setFont(myLabel.getFont().deriveFont(node.getKey().groupName == null ? Font.BOLD : Font.PLAIN));
    myLabel.setEnabled(node.isEnabled());
  }
  else {
    myLabel.setText(getRenamedTitle(value.toString(), value.toString()));
    myLabel.setFont(myLabel.getFont().deriveFont(Font.BOLD));
    myLabel.setEnabled(true);
  }

  Color foreground = selected ? UIUtil.getTableSelectionForeground() : UIUtil.getTableForeground();
  myLabel.setForeground(foreground);

  return myLabel;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:27,代碼來源:OptionTableWithPreviewPanel.java

示例2: customizeCellRenderer

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
protected void customizeCellRenderer(JTable table, Object value, boolean selected) {
  myPanel.removeAll();
  myPanel.setBackground(null);
  myRenderer.clear();
  myRenderer.setBackground(null);

  // 7-8, a hack
  if (value instanceof SvnChangeList) {
    final SvnChangeList changeList = (SvnChangeList)value;
    myRenderer.renderChangeList(table, changeList);

    final Color bg = selected ? UIUtil.getTableSelectionBackground() : UIUtil.getTableBackground();
    final Color fg = selected ? UIUtil.getTableSelectionForeground() : UIUtil.getTableForeground();

    myRenderer.setBackground(bg);
    myRenderer.setForeground(fg);
    myCheckBox.setBackground(bg);
    myCheckBox.setForeground(fg);

    myPanel.setBackground(bg);
    myPanel.setForeground(fg);

    myCheckBox.setSelected(myWiseSelection.isSelected(changeList.getNumber()));
    myPanel.add(myCheckBox, BorderLayout.WEST);
    myPanel.add(myRenderer, BorderLayout.CENTER);
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:28,代碼來源:ToBeMergedDialog.java

示例3: updateColors

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
private void updateColors(boolean isSelected) {
  Color bg = isSelected ? UIUtil.getTableSelectionBackground() : UIUtil.getTableBackground();
  Color fg = isSelected ? UIUtil.getTableSelectionForeground() : UIUtil.getTableForeground();

  setColors(bg, fg, myPanel, myActionLabel, myDateLabel, mySpacePanel);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:7,代碼來源:RecentChangesPopup.java

示例4: updateColors

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
private void updateColors(boolean isSelected) {
  Color bg = isSelected ? UIUtil.getTableSelectionBackground() : UIUtil.getTableBackground();
  Color fg = isSelected ? UIUtil.getTableSelectionForeground() : UIUtil.getTableForeground();

  setColors(bg, fg, myPanel, myNameLabel);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:7,代碼來源:SchemesToImportPopup.java


注:本文中的com.intellij.util.ui.UIUtil.getTableForeground方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。