java.awt.Panel.getComponentCount()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(205)

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

Panel.getComponentCount介绍

暂无

代码示例

代码示例来源:origin: sc.fiji/3D_Viewer

  1. /**
  2. * Removes the specified PointListPanel and hides the window, if it was the
  3. * last one.
  4. *
  5. * @param plp
  6. */
  7. public void removePointList(final PointListPanel plp) {
  8. if (containsPointList(plp)) {
  9. panel.remove(plp);
  10. c.gridx--;
  11. // hide if it is empty
  12. if (panel.getComponentCount() == 0) setVisible(false);
  13. }
  14. }

代码示例来源:origin: google/sagetv

  1. if (embeddedBounds == null || embeddedPanel.getComponentCount() == 0 || embeddedBounds.width == 0 || embeddedBounds.height == 0)
  2. embeddedPanel.setBounds(0, 0, 0, 0);
  3. else

代码示例来源:origin: org.jacorb/jacorb

  1. /**
  2. * Comment
  3. */
  4. private void _actionWindowResized(java.awt.event.ComponentEvent componentEvent) {
  5. int width = getBounds().width;
  6. int diff = (width-12) - curr_width_wp;
  7. if (width > init_width) {
  8. curr_width_wp = curr_width_wp + diff;
  9. } else {
  10. curr_width_wp = init_width_wp;
  11. }
  12. getWorkPanel().setSize(curr_width_wp, getWorkPanel().getComponentCount()*14);
  13. /*
  14. if (width > init_width || curr_width > init_width) {
  15. java.awt.Component[] components = getWorkPanel().getComponents();
  16. System.out.println("Have got all components");
  17. for (int i=0; i<components.length; i++) {
  18. ((DoubleListItem) components[i])._correctWidth(diff);
  19. }
  20. }
  21. */
  22. getScrollPane().validate();
  23. }
  24. public void _addItem(DoubleListItem item) {

相关文章