Package java.awt

Examples of java.awt.Container$WakingRunnable


        }
       
        private Component retargetMouseEvent(Component component, MouseEvent ev) {
          if (component.getBounds().contains(ev.getPoint())) {
            if (component instanceof Container) {
              Container container = (Container)component;
              for (int i = container.getComponentCount() - 1; i >= 0; i--) {
                Component c = container.getComponent(i);
                MouseEvent retargetedEvent = deriveEvent(ev, component, ev.getID(),
                    ev.getX() - component.getX(), ev.getY() - component.getY());
                Component mouseEventTarget = retargetMouseEvent(c, retargetedEvent);
                if (mouseEventTarget != null) {
                  return mouseEventTarget;
View Full Code Here


    getContentPane().setLayout(new BorderLayout());

    logEntryDetail = new JLogEntryDetail(parent, entry);

    Container contentPane = getContentPane();
   
    contentPane.add(logEntryDetail, BorderLayout.CENTER);
   
    pack();
    invalidate();
    setSize(new Dimension(w, h));
View Full Code Here

  public void setExpandedText(String expandedText) {
    _expandedText = expandedText;
  }

  public Component getComponent() {
    Container contentPane = _collapsiblePane.getContentPane();
    if (contentPane.getComponentCount() == 0) {
      return null;
    }
    DCPanel innerPanel = (DCPanel) contentPane.getComponent(0);
    return innerPanel.getComponent(0);
  }
View Full Code Here

    DCPanel innerPanel = (DCPanel) contentPane.getComponent(0);
    return innerPanel.getComponent(0);
  }

  public void setComponent(Component component) {
    Container contentPane = _collapsiblePane.getContentPane();
    contentPane.removeAll();
    if (component != null) {
      contentPane.add(component);
    }
  }
View Full Code Here

    return taskPaneContainer;
  }

  public static JXTaskPane createTaskPane(String title, Icon icon) {
    JXTaskPane taskPane = new JXTaskPane();
    Container cp = taskPane.getContentPane();
    ((JComponent) cp).setBorder(new MatteBorder(0, 1, 1, 1, WidgetUtils.BG_COLOR_DARKEST));
    taskPane.setFocusable(false);
    taskPane.setTitle(title);
    if (icon != null) {
      taskPane.setIcon(icon);
View Full Code Here

    }
  }

  private void setContainerBackground(Component component, Color bg) {
    if (component instanceof Container) {
      Container c = (Container) component;
      // drill further down the tree
      Component child = c.getComponent(0);
      if (child instanceof Container) {
        Container childContainer = (Container) child;
        if (childContainer.getComponentCount() == 1) {
          setContainerBackground(childContainer, bg);
        }
      }
    }
    component.setBackground(bg);
View Full Code Here

  }

  // hack to update the UI of the parent tab - seems there's a problem with
  // updating the JXTaskPaneContainers if a popup appear above them.
  protected void updateParentUI() {
    Container parent = getParent();
    while (parent != null) {
      Container nextParent = parent.getParent();
      if (nextParent == null) {
        break;
      }
      if (!(nextParent instanceof JComponent)) {
        break;
View Full Code Here

        }
      };
      this.toolTipWindow.addMouseListener(mouseAdapter);
      this.toolTipWindow.addMouseMotionListener(mouseAdapter);
    } else {
      Container contentPane = this.toolTipWindow.getContentPane();
      if (contentPane.getComponent(0) != toolTipComponent) {
        contentPane.removeAll();
        contentPane.add(toolTipComponent);
      }
      toolTipComponent.revalidate();
    }
    // Convert (x, y) to screen coordinates
    Point point = new Point(convertXModelToPixel(x), convertYModelToPixel(y));
View Full Code Here

    addPlanControllerListener(controller.getPlanController());
    addFocusListener();
    updateFocusTraversalPolicy();
    JMenuBar homeMenuBar = createMenuBar(home, preferences, controller);
    setJMenuBar(homeMenuBar);
    Container contentPane = getContentPane();
    contentPane.add(createToolBar(home), BorderLayout.NORTH);
    contentPane.add(createMainPane(home, preferences, controller));
    if (OperatingSystem.isMacOSXLeopardOrSuperior()) {
      // Under Mac OS X 10.5, add some dummy labels at left and right borders
      // to avoid the tool bar to be attached on these borders
      // (segmented buttons created on this system aren't properly rendered
      // when they are aligned vertically)
      contentPane.add(new JLabel(), BorderLayout.WEST);
      contentPane.add(new JLabel(), BorderLayout.EAST);
    }

    disableMenuItemsDuringDragAndDrop(controller.getPlanController().getView(), homeMenuBar);
    // Change component orientation
    applyComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
View Full Code Here

  /**
   * Detaches the given <code>view</code> from home view.
   */
  public void detachView(final View view) {
    JComponent component = (JComponent)view;
    Container parent = component.getParent();
    if (parent instanceof JViewport) {
      component = (JComponent)parent.getParent();
      parent = component.getParent();
    }
   
    float dividerLocation;
    if (parent instanceof JSplitPane) {
View Full Code Here

TOP

Related Classes of java.awt.Container$WakingRunnable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.