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

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

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

JComponent.invalidate介绍

暂无

代码示例

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

private void removeSearchField() {
  if (isAlwaysShown()) {
    return;
  }
  if (searchPanel == null) {
    return;
  }
  if (animationTimer != null) {
    animationTimer.stopProgressAnimation();
  }
  Component sp = searchPanel;
  searchPanel = null;
  component.remove(sp);
  component.invalidate();
  component.revalidate();
  component.repaint();
}

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

component.add(searchPanel, constraints);
component.invalidate();
component.revalidate();
component.repaint();

代码示例来源:origin: org.japura/japura-gui

@Override
public void invalidate() {
 if (inAction == false) {
  calculatedHeight = -1;
 }
 super.invalidate();
}

代码示例来源:origin: net.sf.sfac/sfac-core

private void relayout() {
  if (editorCmp != null) {
    editorCmp.invalidate();
    editorCmp.repaint();
  } else if (objectCmp != null) {
    objectCmp.invalidate();
    objectCmp.repaint();
  }
}

代码示例来源:origin: de.sciss/prefuse-core

/**
 * Invalidates this component. Overridden to ensure that an
 * internal damage report is generated.
 * @see java.awt.Component#invalidate()
 */
public void invalidate() {
  damageReport();
  super.invalidate();
}

代码示例来源:origin: crashinvaders/gdx-texture-packer-gui

public void invalidate () {
    super.invalidate();
    layout.invalidate();
  }
}

代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
public void invalidate() {
  invalidateDimension();
  super.invalidate();
}

代码示例来源:origin: org.icepdf.os/icepdf-viewer

public void invalidate() {
  super.invalidate();
  pagesPanel.invalidate();
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-swing-customizerlayout

public void register(LayoutDataProvider p) {
  known.add (p);
  for (LayoutDataProvider d : known) {
    if (d instanceof JComponent) {
      ((JComponent) d).invalidate();
      ((JComponent) d).revalidate();
      ((JComponent) d).repaint();
    }
  }
}

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-mobility-svgcore

private void repaintAll() {
  getScreenManager().getAnimatorView().invalidate();
  basePanel.validate();
  basePanel.repaint();
}

代码示例来源:origin: ru.sbtqa/monte-media

public void setSettingsEnabled(boolean b) {
  for (Component c : getContentPane().getComponents()) {
    if (c != startStopButton && c != stateLabel) {
      c.setEnabled(b);
    }
  }
  ((JComponent) getContentPane()).invalidate();
  ((JComponent) getContentPane()).revalidate();
}

代码示例来源:origin: com.github.stephenc.monte/monte-screen-recorder

public void setSettingsEnabled(boolean b) {
  for (Component c : getContentPane().getComponents()) {
    if (c != startStopButton && c != stateLabel) {
      c.setEnabled(b);
    }
  }
  ((JComponent) getContentPane()).invalidate();
  ((JComponent) getContentPane()).revalidate();
}

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

@Override
public void afterRemovingSelectedElements()
{
  this.editorPart.getSwingComponent().invalidate();
  this.editorPart.getSwingComponent().repaint();
}

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

@Override
public void whileEditingNode(INode node, PropertyChangeEvent event)
{
  this.editorPart.getSwingComponent().invalidate();
  this.editorPart.getSwingComponent().repaint();
}

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

public void mouseClicked(MouseEvent _evt)
 {
  closed_=!closed_;
  s.setVisible(!closed_);
  ((JComponent)getContentPane()).invalidate();
  //((JComponent)getContentPane()).doLayout();
  //((JComponent)getContentPane()).validate();
  relocate();
 }
});

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

@Override
public void onEdgeSelected(IEdge edge)
{
  this.editorPart.getSwingComponent().invalidate();
  this.editorPart.getSwingComponent().repaint();
}

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-mobility-svgcore

public void repaint() {
  //TODO FIX: NPE when playing with window cloning
  m_imageContainer.setTryPaint();
  m_animatorView.invalidate();
  m_topComponent.validate(); 
  m_animatorView.repaint();
  m_topComponent.repaint();
}

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

/**
 * Restores next graph action from the history cursor location
 */
public void redo()
{
  if (undoManager.canRedo())
  {
    undoManager.redo();
    editorPart.getSwingComponent().invalidate();
    editorPart.getSwingComponent().repaint();
  }
}

代码示例来源:origin: JetBrains/jediterm

private void invalidateIfNeeded() {
  if (getLabelComponent().getRootPane() == null) return;
  Dimension d = getLabelComponent().getSize();
  Dimension pref = getLabelComponent().getPreferredSize();
  if (d != null && d.equals(pref)) {
    return;
  }
  setInactiveStateImage(null);
  getLabelComponent().invalidate();
  myTabs.revalidateAndRepaint(false);
}

代码示例来源:origin: xyz.cofe/docking-frames-ext-toolbar

protected void insertAt( StationChildHandle handle, int index ){
  final Dockable dockable = handle.getDockable();
  dockable.setDockParent( this );
  mainPanel.getDockablePane().add( handle.getDisplayer().getComponent(), index );
  mainPanel.getDockablePane().invalidate();
  mainPanel.revalidate();
  mainPanel.getContentPane().repaint();
}

相关文章

JComponent类方法