Package java.awt

Examples of java.awt.Container$GfxPaintVisitor


        JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
    pref.height = Math.min(pref.height, pref.width * 3 / 2);
    scroll.setPreferredSize(pref);
    scroll.getViewport().setBackground(editor.getBackground());

    Container contents = getContentPane();
    contents.add(scroll, BorderLayout.CENTER);
    contents.add(buttonPanel, BorderLayout.SOUTH);

    LocaleManager.addLocaleListener(myListener);
    myListener.localeChanged();
    pack();
   
View Full Code Here


    LocaleManager.addLocaleListener(this);
  }
 
  private void placeToolbar() {
    String loc = AppPreferences.TOOLBAR_PLACEMENT.get();
    Container contents = getContentPane();
    contents.remove(toolbar);
    mainPanelSuper.remove(toolbar);
    if (AppPreferences.TOOLBAR_HIDDEN.equals(loc)) {
      ; // don't place value anywhere
    } else if (AppPreferences.TOOLBAR_DOWN_MIDDLE.equals(loc)) {
      toolbar.setOrientation(Toolbar.VERTICAL);
      mainPanelSuper.add(toolbar, BorderLayout.WEST);
    } else { // it is a BorderLayout constant
      Object value = BorderLayout.NORTH;
      for (Direction dir : Direction.cardinals) {
        if (dir.toString().equals(loc)) {
          if (dir == Direction.EAST)       value = BorderLayout.EAST;
          else if (dir == Direction.SOUTH) value = BorderLayout.SOUTH;
          else if (dir == Direction.WESTvalue = BorderLayout.WEST;
          else                             value = BorderLayout.NORTH;
        }
      }

      contents.add(toolbar, value);
      boolean vertical = value == BorderLayout.WEST || value == BorderLayout.EAST;
      toolbar.setOrientation(vertical ? Toolbar.VERTICAL : Toolbar.HORIZONTAL);
    }
    contents.validate();
  }
View Full Code Here

    JPanel buttonPanel = new JPanel();
    buttonPanel.add(close);
    close.addActionListener(myListener);

    Container contents = getContentPane();
    tabbedPane.setPreferredSize(new Dimension(450, 300));
    contents.add(tabbedPane, BorderLayout.CENTER);
    contents.add(buttonPanel, BorderLayout.SOUTH);
   
    if (intlIndex >= 0) tabbedPane.setSelectedIndex(intlIndex);

    LocaleManager.addLocaleListener(myListener);
    myListener.localeChanged();
View Full Code Here

    addTab(OUTPUTS_TAB, outputsPanel);
    addTab(TABLE_TAB, truthTablePanel);
    addTab(EXPRESSION_TAB, expressionPanel);
    addTab(MINIMIZED_TAB, minimizedPanel);
   
    Container contents = getContentPane();
    JPanel vertStrut = new JPanel(null);
    vertStrut.setPreferredSize(new Dimension(0, 300));
    JPanel horzStrut = new JPanel(null);
    horzStrut.setPreferredSize(new Dimension(450, 0));
    JPanel buttonPanel = new JPanel();
    buttonPanel.add(buildCircuit);
    contents.add(vertStrut, BorderLayout.WEST);
    contents.add(horzStrut, BorderLayout.NORTH);
    contents.add(tabbedPane, BorderLayout.CENTER);
    contents.add(buttonPanel, BorderLayout.SOUTH);
   
    DefaultRegistry registry = new DefaultRegistry(getRootPane());
    inputsPanel.registerDefaultButtons(registry);
    outputsPanel.registerDefaultButtons(registry);
    expressionPanel.registerDefaultButtons(registry);
View Full Code Here

    JButton button = new JButton(Strings.get("statsCloseButton"));
    button.addActionListener(this);
    JPanel buttonPanel = new JPanel();
    buttonPanel.add(button);
   
    Container contents = this.getContentPane();
    contents.setLayout(new BorderLayout());
    contents.add(tablePane, BorderLayout.CENTER);
    contents.add(buttonPanel, BorderLayout.PAGE_END);
    this.pack();
   
    Dimension pref = contents.getPreferredSize();
    if (pref.width > 750 || pref.height > 550) {
      if (pref.width > 750) pref.width = 750;
      if (pref.height > 550) pref.height = 550;
      this.setSize(pref);
    }
View Full Code Here

      if (column >= 1 && column <= 2 && row >= 0) {
        Object value = getValueAt(row, column);
        if (value != null) {
          Component renderComp = getCellRenderer(row, column).getTableCellRendererComponent(this, value, false, false, row, column);
          if (renderComp instanceof Container) {
            Container container = (Container) renderComp;
            if (container.getComponentCount() > 0 && container.getComponent(0) instanceof ProgramPanel) {
              ProgramPanel panel = (ProgramPanel) container.getComponent(0);
              Rectangle cellRect = getCellRect(row, column, true);
              int x = event.getX() - cellRect.x - panel.getX();
              int y = event.getY() - cellRect.y - panel.getY();
              return panel.getToolTipText(x, y);
            }
View Full Code Here

    JPanel buttonPanel = new JPanel();
    buttonPanel.add(close);
    close.addActionListener(myListener);

    Container contents = getContentPane();
    tabbedPane.setPreferredSize(new Dimension(450, 300));
    contents.add(tabbedPane, BorderLayout.CENTER);
    contents.add(buttonPanel, BorderLayout.SOUTH);

    LocaleManager.addLocaleListener(myListener);
    myListener.localeChanged();
    pack();
  }
View Full Code Here

        int y = point.y - bounds.y;
        Component component = getCellRenderer()
            .getListCellRendererComponent(this, mPrograms.elementAt(index),
                index, false, false);
        if (component != null && component instanceof Container) {
          Container container = (Container) component;
          component = container.getComponent(1);
          if (component != null && component instanceof ProgramPanel) {
            ProgramPanel panel = (ProgramPanel) component;
            x -= panel.getX();
            y -= panel.getY();
            return panel.getToolTipText(x, y);
View Full Code Here

   * Actually perform the expand operation.
   */
  private void doExpand() {
    add("Center", container);
    label.setIcon(collapseIcon);
    Container rootPaneContainer = getParentRootPaneContainer();
    if (rootPaneContainer != null) {
      Dimension d0 = rootPaneContainer.getSize();
      Dimension d1 = container.getSize();
      Dimension d2 = container.getPreferredSize();
      rootPaneContainer.setSize(d0.width, d0.height + Math.max(d1.height, d2.height));
    }
  }
View Full Code Here

   * Actually perform the collapse operation.
   */
  private void doCollapse() {
    remove(container);
    label.setIcon(expandIcon);
    Container rootPaneContainer = getParentRootPaneContainer();
    if (rootPaneContainer != null) {
      Dimension d0 = rootPaneContainer.getSize();
      Dimension d1 = container.getSize();
      Dimension d2 = container.getPreferredSize();
      rootPaneContainer.setSize(d0.width, d0.height - Math.max(d1.height, d2.height));
    }
  }
View Full Code Here

TOP

Related Classes of java.awt.Container$GfxPaintVisitor

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.