javax.swing.JComponent.paintImmediately()方法的使用及代码示例

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

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

JComponent.paintImmediately介绍

暂无

代码示例

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

public void run()
 {
  _c.paintImmediately(0,0,_c.getWidth(),_c.getHeight());
 }
});

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

public static void repaintBorder(JComponent component) {
  final int borderWidth = ((ViewerBorder)component.getBorder()).borderWidth;
  component.paintImmediately(0, 0, component.getWidth(), borderWidth);
  component.paintImmediately(0, component.getHeight() - borderWidth, component.getWidth(), borderWidth);
  component.paintImmediately(0, 0, borderWidth, component.getHeight());
  component.paintImmediately(component.getWidth() - borderWidth, 0, borderWidth, component.getHeight());
}

代码示例来源:origin: com.harium.propan/propan-jogl

protected void paintDirtyRects() {
  for (Entry<JComponent, Rectangle> entry : repaints.entrySet()) {
   entry.getKey().paintImmediately(entry.getValue());
  }

  repaints = null;
 }
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-debugger-common2

private void paintImmediately() {
if (dialog instanceof JDialog) {
  JDialog jdialog = (JDialog) dialog;
  JComponent rootPane = jdialog.getRootPane();
  final Rectangle rect = new Rectangle();
  rootPane.getBounds(rect);
  rect.x = 0;
  rect.y = 0;
  rootPane.paintImmediately(rect);
}
}

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

_c.paintImmediately(0,0,_c.getWidth(),_c.getHeight());

代码示例来源:origin: stackoverflow.com

public void run() {
for(int i = 0 ; i< 2 ; i++){
 paintImmediately(0, 0, getWidth(), getHeight());
 try {
 Thread.sleep(5000);

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

public void paintImmediately() {
  ((JComponent) getRootPane()).paintImmediately(0, 0, getWidth(), getHeight());
}

代码示例来源:origin: stackoverflow.com

public void actionPerformed(ActionEvent e) {
  Content.isToDraw = true;
  content.paintImmediately(content.getBounds());
  Content.isToDraw = false;
 @Override
public void actionPerformed(ActionEvent e) {
  content.paintImmediately(content.getBounds());

代码示例来源:origin: stackoverflow.com

progressBar.paintImmediately(0, 0, 200, 200);
progressBar.setValue(i);
i++;

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

public void mouseReleased(MouseEvent _evt) {
 if (over_ instanceof DndSensible) ((DndSensible) over_).exitedDrop();
 if (dragging_) {
  dragging_ = false;
  JComponent s = (JComponent) _evt.getSource();
  s.setCursor(cursor_);
  s.putClientProperty("DND_EVENTS", null);
  if (s instanceof DndSensible) ((DndSensible) s).exitedDrop();
  if ((over_ != null) && (target_ != null) && (values_ != null) && (loc_ != null)) target_.drop(values_, over_,
  /* SwingUtilities. */convertPoint(s, _evt.getX(), _evt.getY(), over_), getMode());
  Component top = getTopLevelAncestor(s, _evt.getX(), _evt.getY());
  if (top instanceof RootPaneContainer) top = ((RootPaneContainer) top).getContentPane();
  if (top instanceof JComponent) ((JComponent) top).paintImmediately(ox - 1, oy - 1, ow + 1, oh + 1);
 }
 over_ = null;
 target_ = null;
 values_ = null;
 loc_ = null;
 windows_ = null;
 timer_.stop();
 // _evt.consume();
 /*
  * if(top instanceof BuApplication) { BuApplication a=(BuApplication)top; a.setGlassPane(glass_); }
  */
}

代码示例来源:origin: stackoverflow.com

Component c = this;
   Component parent;
   if(!isShowing()) {
     return;
   }
   JComponent paintingOigin = SwingUtilities.getPaintingOrigin(this);
   if (paintingOigin != null) {
     Rectangle rectangle = SwingUtilities.convertRectangle(
         c, new Rectangle(x, y, w, h), paintingOigin);
     paintingOigin.paintImmediately(rectangle.x, rectangle.y, rectangle.width, rectangle.height);
     return;
   }
   while(!c.isOpaque()) {
     parent = c.getParent();
     if(parent != null) {
       x += c.getX();
       y += c.getY();
       c = parent;
     } else {
       break;
     }
     if(!(c instanceof JComponent)) {
       break;
     }
 }
 if(c instanceof JComponent) {
   ((JComponent)c)._paintImmediately(x,y,w,h);
 } else {
   c.repaint(x,y,w,h);
 }

代码示例来源:origin: stackoverflow.com

pb.paintImmediately(0, 0, 200, 25);
  pb.setValue(i);
         i++;

代码示例来源:origin: stackoverflow.com

public void run() {
  while (true) {
    comp.paintImmediately(comp.getBounds());

代码示例来源:origin: stackoverflow.com

pb.paintImmediately(0, 0, 200, 25);
  pb.setValue(i);
         i++;

代码示例来源:origin: stackoverflow.com

paintImmediately(0, 0, getWidth(), getHeight());

代码示例来源:origin: stackoverflow.com

paintImmediately(0, 0, getWidth(), getHeight());

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

final TableCellEditor cellEditor = getCellEditor();
if(isEditing() && cellEditor instanceof DialogTableCellEditor){
  ((JComponent)editorComp).paintImmediately(0, 0, editorComp.getWidth(), editorComp.getHeight());
  ((DialogTableCellEditor)cellEditor).startEditing();

代码示例来源:origin: edu.stanford.protege/org.protege.editor.owl

private void checkForLinkClick(MouseEvent event) {
  if(component == null) {
    return;
  }
  Point pos = component.getMousePosition();
  if (pos == null) {
    return;
  }
  if (component instanceof JList) {
    JList list = (JList) component;
    int index = list.locationToIndex(pos);
    if(index != -1) {
      component.paintImmediately(list.getCellBounds(index, index));
    }
  }
  for(LinkBox link : pageLinks) {
    if(link.contains(pos.x, pos.y)) {
      link.getLink().activate(component, event);
    }
  }
}

代码示例来源:origin: edu.stanford.protege/protege-editor-owl

private void checkForLinkClick(MouseEvent event) {
  if(component == null) {
    return;
  }
  Point pos = component.getMousePosition();
  if (pos == null) {
    return;
  }
  if (component instanceof JList) {
    JList list = (JList) component;
    int index = list.locationToIndex(pos);
    if(index != -1) {
      component.paintImmediately(list.getCellBounds(index, index));
    }
  }
  for(LinkBox link : pageLinks) {
    if(link.contains(pos.x, pos.y)) {
      link.getLink().activate(component, event);
    }
  }
}

代码示例来源:origin: protegeproject/protege

private void checkForLinkClick(MouseEvent event) {
  if(component == null) {
    return;
  }
  Point pos = component.getMousePosition();
  if (pos == null) {
    return;
  }
  if (component instanceof JList) {
    JList list = (JList) component;
    int index = list.locationToIndex(pos);
    if(index != -1) {
      component.paintImmediately(list.getCellBounds(index, index));
    }
  }
  for(LinkBox link : pageLinks) {
    if(link.contains(pos.x, pos.y)) {
      link.getLink().activate(component, event);
    }
  }
}

相关文章

JComponent类方法