本文整理了Java中java.awt.Container.repaint()
方法的一些代码示例,展示了Container.repaint()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Container.repaint()
方法的具体详情如下:
包路径:java.awt.Container
类名称:Container
方法名:repaint
暂无
代码示例来源:origin: stanfordnlp/CoreNLP
private static void useProgressBarHelper(Container parent, JComponent add, JComponent remove) {
GridBagConstraints c = new GridBagConstraints();
c.fill = GridBagConstraints.BOTH;
c.weightx = 1.7;
parent.remove(remove);
parent.add(add,c);
parent.validate();
parent.repaint();
}
代码示例来源:origin: libgdx/libgdx
protected void removePanel () {
Container parent = this.getParent();
parent.remove(this);
parent.validate();
parent.repaint();
}
代码示例来源:origin: libgdx/libgdx
protected void removePanel () {
Container parent = this.getParent();
parent.remove(this);
parent.validate();
parent.repaint();
}
代码示例来源:origin: RaiMan/SikuliX2
@Override
public void actionPerformed(ActionEvent e) {
float r = funcr.getValue(count);
int x = (int) (origin.x + (int) radius * Math.sin(r));
int y= (int) (origin.y + (int) radius * Math.cos(r));
Point p = new Point(x,y);
Rectangle r1 = comp.getBounds();
comp.setLocation(p);
// r1 stores the union of the bounds before/after the animated step
Rectangle r2 = comp.getBounds();
r1.add(r2);
comp.getParent().getParent().repaint(r1.x,r1.y,r1.width,r1.height);
//repaint(r1);
// comp.getParent().invalidate();
// comp.repaint();
if (count == repeatCount)
count = 0;
else
count++;
}
}
代码示例来源:origin: jshiell/checkstyle-idea
private void moveToStep(final Step newStep) {
remove(panelForCurrentStep());
currentStep = newStep;
if (currentStep.isAllowCommit()) {
commitButton.setText(CheckStyleBundle.message("config.file.okay.text"));
commitButton.setToolTipText(CheckStyleBundle.message("config.file.okay.text"));
} else {
commitButton.setText(CheckStyleBundle.message("config.file.next.text"));
commitButton.setToolTipText(CheckStyleBundle.message("config.file.next.text"));
}
previousButton.setEnabled(currentStep.isAllowPrevious());
commitButton.setEnabled(currentStep.isAllowNext() || currentStep.isAllowCommit());
getContentPane().add(panelForCurrentStep(), BorderLayout.CENTER);
getContentPane().validate();
getContentPane().repaint();
}
代码示例来源:origin: RaiMan/SikuliX2
public void setMouseOver(boolean mouseOver) {
if (this.mouseOver != mouseOver) {
if (this.mouseOver) {
globalMouseExited();
} else {
globalMouseEntered();
}
Rectangle r = getBounds();
this.getTopLevelAncestor().repaint(r.x, r.y, r.width, r.height);
}
this.mouseOver = mouseOver;
}
代码示例来源:origin: RaiMan/SikuliX2
@Override
public void actionPerformed(ActionEvent e){
if ( count <= repeatCount){
int x = (int) tfuncx.getValue(count);
int y = (int) tfuncy.getValue(count);
count++;
Rectangle r1 = comp.getBounds();
comp.setActualLocation(x,y);
Rectangle r2 = comp.getBounds();
r1.add(r2);
Container c = comp.getParent();
if (c != null){
c.getParent().getParent().repaint(r1.x,r1.y,r1.width,r1.height);
}
}else{
timer.stop();
}
}
代码示例来源:origin: RaiMan/SikuliX2
@Override
public void componentMoved(ComponentEvent e) {
Rectangle r = getBounds();
updateBounds();
r.add(getBounds());
if (getTopLevelAncestor() != null)
getTopLevelAncestor().repaint(r.x,r.y,r.width,r.height);
}
代码示例来源:origin: RaiMan/SikuliX2
@Override
public void actionPerformed(ActionEvent e) {
if (isRunning()) {
Rectangle r = sklComponent.getBounds();
//setActualLocation((int) x, (int) y);
animate();
r.add(sklComponent.getBounds());
if (sklComponent.getTopLevelAncestor() != null) {
sklComponent.getTopLevelAncestor().repaint(r.x, r.y, r.width, r.height);
}
} else {
timer.stop();
if (looping) {
start();
} else {
animationRunning = false;
if (listener != null) {
listener.animationCompleted();
}
}
}
}
}
代码示例来源:origin: magefree/mage
parent.repaint();
代码示例来源:origin: bobbylight/RSyntaxTextArea
getContainer().repaint();
getContainer().repaint();
代码示例来源:origin: RaiMan/SikuliX2
public void setOpacity(float opacity) {
if (opacity > 0) {
setVisible(true);
} else {
setVisible(false);
}
this.opacity = opacity;
for (Visual sklComp : getFollowers()) {
sklComp.setOpacity(opacity);
}
// if (shadowRenderer != null){
// shadowRenderer.createShadowImage();
// }
Rectangle r = getBounds();
if (getTopLevelAncestor() != null) //getTopLevelAncestor().repaint(r.x,r.y,r.width,r.height);
// for some reason the whole thing needs to be repainted otherwise the
// shadow of other compoments looks weird
{
getTopLevelAncestor().repaint();
}
// public void changeOpacityTo(float targetOpacity){
// OpacityAnimator anim = new OpacityAnimator(this, opacity,targetOpacity);
// anim.start();
// }
}
代码示例来源:origin: RaiMan/SikuliX2
@Override
public void updateComponent() {
setForeground(colorFront);
Rectangle dirtyBounds = getBounds();
if (from != null && to != null) {
source = from.getCenter();
destination = to.getCenter();
}
Rectangle r = new Rectangle(getSource());
r.add(getDestination());
r.grow(10, 10);
setActualBounds(r);
dirtyBounds.add(getBounds());
if (getTopLevelAncestor() != null) {
getTopLevelAncestor().repaint(dirtyBounds.x, dirtyBounds.y, dirtyBounds.width, dirtyBounds.height);
}
if (hasComponents) {
updateVisibility();
}
}
代码示例来源:origin: undera/jmeter-plugins
public void removeServer(JMeterServerPanel jMeterServerPanel) {
serversList.remove(jMeterServerPanel);
getParent().repaint();
}
}
代码示例来源:origin: Exslims/MercuryTrade
@Override
public void mouseDragged(MouseEvent e) {
slider.getParent().repaint();
}
});
代码示例来源:origin: freeplane/freeplane
public static void repaintAll(Container root) {
root.repaint();
for(int i = 0; i < root.getComponentCount(); i++){
final Component component = root.getComponent(i);
if(component instanceof Container){
repaintAll((Container) component);
}
else{
component.repaint();
}
}
}
代码示例来源:origin: stackoverflow.com
BasicInternalFrameUI ui = (BasicInternalFrameUI)internalFrame.getUI();
Container north = (Container)ui.getNorthPane();
north.remove(0);
north.validate();
north.repaint();
代码示例来源:origin: stackoverflow.com
open.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
AssignToTransientPanel((JPanel) new NewAlbum());
Container content = mainFrame.getContentPane();
content.removeAll();
content.add(transientPanel);
content.validate();
content.repaint();
}
});
代码示例来源:origin: undera/jmeter-plugins
public void add(String stringValue) {
JMeterServerPanel panel = new JMeterServerPanel(stringValue, this);
serversList.add(panel);
add(panel);
getParent().repaint();
}
代码示例来源:origin: mucommander/mucommander
private void updateFrame() {
FileFrame frame = getFrame();
// Revalidate, pack and repaint should be called in this order
frame.setTitle(this.getTitle());
imageViewerImpl.revalidate();
frame.pack();
frame.getContentPane().repaint();
}
内容来源于网络,如有侵权,请联系作者删除!