javax.swing.JLayeredPane.validate()方法的使用及代码示例

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

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

JLayeredPane.validate介绍

暂无

代码示例

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

/**
 * Makes the alphabetical markers invisible.
 */
public void hideMarkers() {
  UIThreadsUtil.mustBeSwingThread();
  if (markers != null && !markers.isEmpty()) {
    parent.remove(this);
    parent.validate();
    parent.repaint();
    markers.clear();
  }
  markers = null;
}

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

/**
 * Makes the alphabetical markers visible.
 */
public void showMarkers() {
  UIThreadsUtil.mustBeSwingThread();
  markers = createMarkers(getViewableSegmentLocations());
  if (markers.isEmpty()) {
    return;
  }
  setSize(parent.getWidth() - 1, parent.getHeight() - 1);
  parent.add(this, JLayeredPane.POPUP_LAYER, 0); // top most
  parent.validate();
  parent.repaint();
}

代码示例来源:origin: com.jidesoft/jide-oss

/**
 * Hides the popup.
 */
public void hidePopup() {
  if (_popup != null) {
    if (isHeavyweightComponentEnabled()) {
      _popup.hidePopupImmediately();
    }
    else {
      if (_layeredPane != null) {
        _layeredPane.remove(_popup);
        _layeredPane.validate();
        _layeredPane.repaint();
        _layeredPane = null;
      }
    }
    _popup = null;
    _searchableProvider = null;
    _previousSearchText = null;
    fireSearchableEvent(new SearchableEvent(Searchable.this, SearchableEvent.SEARCHABLE_END, "", getCurrentIndex(), _previousSearchText));
  }
  setCursor(-1);
}

代码示例来源:origin: net.sourceforge.mydoggy/mydoggy-plaf

protected void update() {
  // Reset Layout
  titleBarButtons.setType(ToolWindowType.SLIDING);
  TableLayout layout = (TableLayout) sheet.getLayout();
  layout.setColumn(0, 0);
  layout.setColumn(2, 0);
  layout.setRow(0, 0);
  layout.setRow(2, 0);
  if (barContainer != null)
    barContainer.getParent().getLayout().layoutContainer(barContainer.getParent());
  resize();
  Component content = dockedContainer.getContentContainer();
  sheet.remove(content);
  sheet.add(content, "1,1,FULL,FULL");
  // Prepare sheet
  border.setAnchor(toolWindow.getAnchor());
  sheet.setBorder(border);
  int height = mainPanel.getHeight();
  Point point = SwingUtilities.convertPoint(mainPanel, 0, 0, layeredPane);
  sheet.setBounds(point.x, point.y, mainPanel.getWidth(), height);
  layeredPane.remove(sheet);
  layeredPane.setLayer(sheet, JLayeredPane.DEFAULT_LAYER + 2);
  layeredPane.add(sheet);
  layeredPane.validate();
}

代码示例来源:origin: com.jidesoft/jide-oss

if (_popup != null && _layeredPane != null) {
  _layeredPane.remove(_popup);
  _layeredPane.validate();
  _layeredPane.repaint();
  _layeredPane = null;

相关文章