Package javax.swing

Examples of javax.swing.CellRendererPane$AccessibleCellRendererPane


  /**
   * Creates a new <code>BasicComboBoxUI</code> object.
   */
  public BasicComboBoxUI()
  {
    currentValuePane = new CellRendererPane();
    cachedMinimumSize = new Dimension();
  }
View Full Code Here


   *
   * @return the rendererpane that render components are placed in.
   */
  protected CellRendererPane createCellRendererPane()
  {
    return new CellRendererPane();
  }
View Full Code Here

    private Color background;

    public CToolTipUI(Color background) {
        super();
        this.background = background;
        renderer = new CellRendererPane();
        textArea = new JTextArea();
        textArea.setMargin(new Insets(0, 3, 0, 0));
        renderer.removeAll();
        renderer.add(textArea);
        textArea.setFont(new Font("Ariel", Font.PLAIN, 11));
View Full Code Here

       
        private Dimension maxPrefSize;
       
        public Canvas() {
            setLayout(null);
            rendererPane = new CellRendererPane();
            maxPrefSize = new Dimension();
            add(rendererPane, BorderLayout.CENTER);
            setBackground(Color.WHITE);
            setOpaque(true);
            setFocusTraversalKeysEnabled(false);
View Full Code Here

  }

  public void installUI(JComponent c) {
    super.installUI(c);
    tip = (JToolTip) c;
    rendererPane = new CellRendererPane();
    c.add(rendererPane);
  }
View Full Code Here

  /**
   * Returns the renderer pane that renderer components are placed in.
   */
  protected CellRendererPane createCellRendererPane() {
    return new CellRendererPane();
  }
View Full Code Here

        Runnable doCreateFrames =
            new Runnable() {
                public void run() {
                    final int WIDTH = 500;
                    final int HEIGHT = 500;
                    CellRendererPane rendererPane = new CellRendererPane();
                    rendererPane.add(editor);
                    //the values do not matter
                    //we only need to get frames created
                    rendererPane.setSize(WIDTH, HEIGHT);
                };
            };
        if (SwingUtilities.isEventDispatchThread()) {
            doCreateFrames.run();
        } else {
View Full Code Here

        assert SwingUtilities.isEventDispatchThread();
        //need to have big value but smaller than MAX_VALUE otherwise
        //printing goes south due to overflow somewhere
        final int HUGE_INTEGER = Integer.MAX_VALUE - 1000;

        CellRendererPane rendererPane = new CellRendererPane();

        //need to use JViewport since text is layouted to the viewPort width
        //otherwise it will be layouted to the maximum text width
        JViewport viewport = new JViewport();
        viewport.setBorder(null);
        Dimension size = new Dimension(width, HUGE_INTEGER);

        //JTextField is a special case
        //it layouts text in the middle by Y
        if (printShell instanceof JTextField) {
            size =
                new Dimension(size.width, printShell.getPreferredSize().height);
        }
        printShell.setSize(size);
        viewport.setComponentOrientation(printShell.getComponentOrientation());
        viewport.setSize(size);
        viewport.add(printShell);
        rendererPane.add(viewport);
    }
View Full Code Here

      int rowHeight=((GanttParams)graphInfo).getRowHeight();
      config=((GanttParams)graphInfo).getConfiguration();
      yrow=node.getRow()*rowHeight;

      if (container!=null){
        rendererPane=new CellRendererPane();
        container.add(rendererPane);
      }
      component.setFont(FontUtil.getFont(null,Environment.GANTT_ANNOTATIONS_FONT));
      fontMetrics=component.getFontMetrics(component.getFont());
    }
View Full Code Here

    /**
     * @return a CellRendererPane suitable for drawing components in (with CellRendererPane.paintComponent)
     */
    public CellRendererPane getCellRendererPane() {
        if (cellRendererPane == null || cellRendererPane.getParent() != this) {
            cellRendererPane = new CellRendererPane();
            this.add(cellRendererPane);
        }

        return cellRendererPane;
    }
View Full Code Here

TOP

Related Classes of javax.swing.CellRendererPane$AccessibleCellRendererPane

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.