javax.swing.JTable.paintComponent()方法的使用及代码示例

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

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

JTable.paintComponent介绍

暂无

代码示例

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

/**
 * {@inheritDoc }
 * <p>
Overridden to optimize excessive cell setViewValue
 */
@Override
protected void paintComponent(Graphics g) {
 paintCount++;
 super.paintComponent(g);
}

代码示例来源:origin: org.netbeans.api/org-openide-explorer

public void paintComponent(Graphics g) {
  super.paintComponent(g);
  //Issue 41546 - bad repaint when scrolling
  if ((searchField != null) && searchField.isVisible()) {
    searchpanel.repaint();
  }
}

代码示例来源:origin: org.apache.poi/poi-examples

@Override
 public void paintComponent(Graphics g1) {
  Graphics2D g = (Graphics2D) g1;

  pendingPaintings.clear();

  g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
    RenderingHints.VALUE_ANTIALIAS_ON);
  super.paintComponent(g);

  pendingPaintings.paint(g);
 }
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide

public void paintComponent (Graphics g) {
  super.paintComponent(g);
  //Issue 41546 - bad repaint when scrolling
  if (searchField != null && searchField.isVisible()) {
    searchField.repaint();
  }
}

代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide

public void paintComponent (Graphics g) {
  super.paintComponent(g);
  //Issue 41546 - bad repaint when scrolling
  if (searchField != null && searchField.isVisible()) {
    searchField.repaint();
  }
}

代码示例来源:origin: omegat-org/omegat

@Override
  protected void paintComponent(Graphics g) {
    super.paintComponent(g);
    if (flasher != null && flasher.isFlashing()) {
      repaint();
    }
  }
}

代码示例来源:origin: cytoscape.coreplugins/attribute-browser

protected void paintComponent(Graphics g) {
  super.paintComponent(g);
  if (isEditing()) {
    Component component = getEditorComponent();
    component.repaint();
  }
}

代码示例来源:origin: org.netbeans.api/org-openide-explorer

/** Overridden to manually draw the focused rectangle for the tree column */
@Override
public void paintComponent(Graphics g) {
  super.paintComponent(g);
  if (hasFocus() && (getSelectedColumn() == 0) && (getSelectedRow() > 0)) {
    Color bdr = UIManager.getColor("Tree.selectionBorderColor"); //NOI18N
    if (bdr == null) {
      //Button focus color doesn't work on win classic - better to
      //get the color from a value we know will work - Tim
      if (getForeground().equals(Color.BLACK)) { //typical
        bdr = getBackground().darker();
      } else {
        bdr = getForeground().darker();
      }
    }
    g.setColor(bdr);
    Rectangle r = getCellRect(getSelectedRow(), getSelectedColumn(), false);
    g.drawRect(r.x + 1, r.y + 1, r.width - 3, r.height - 3);
  }
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide

/** Overridden to manually draw the focused rectangle for the tree column */
public void paintComponent(Graphics g) {
  super.paintComponent(g);
  if (hasFocus() && getSelectedColumn() == 0 && getSelectedRow() > 0) {
      Color bdr = UIManager.getColor("Tree.selectionBorderColor"); //NOI18N
      if (bdr == null) {
        //Button focus color doesn't work on win classic - better to
        //get the color from a value we know will work - Tim
        if (getForeground().equals(Color.BLACK)) { //typical
          bdr = getBackground().darker();
        } else {
          bdr = getForeground().darker();
        }
      }
      g.setColor(bdr);
    Rectangle r = getCellRect (getSelectedRow(), getSelectedColumn(), false);
    g.drawRect(r.x+1, r.y+1, r.width - 3, r.height - 3);
  }
}

代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide

/** Overridden to manually draw the focused rectangle for the tree column */
public void paintComponent(Graphics g) {
  super.paintComponent(g);
  if (hasFocus() && getSelectedColumn() == 0 && getSelectedRow() > 0) {
      Color bdr = UIManager.getColor("Tree.selectionBorderColor"); //NOI18N
      if (bdr == null) {
        //Button focus color doesn't work on win classic - better to
        //get the color from a value we know will work - Tim
        if (getForeground().equals(Color.BLACK)) { //typical
          bdr = getBackground().darker();
        } else {
          bdr = getForeground().darker();
        }
      }
      g.setColor(bdr);
    Rectangle r = getCellRect (getSelectedRow(), getSelectedColumn(), false);
    g.drawRect(r.x+1, r.y+1, r.width - 3, r.height - 3);
  }
}

代码示例来源:origin: ggp-org/ggp-base

super.paintComponent(g);
  return;
super.paintComponent(g);
setOpaque(true);

代码示例来源:origin: freeplane/freeplane

@Override
protected void paintComponent(Graphics g) {
  if(gridColor == null){
    final NodeView nodeView = attributeView.getNodeView();
    if(SwingUtilities.isDescendingFrom(this, nodeView))
      setGridAndBorderColor(nodeView.getMainView().getBorderColor());
  }
  super.paintComponent(g);
}

代码示例来源:origin: Multibit-Legacy/multibit-hd

super.paintComponent(g);

相关文章

JTable类方法