Package javax.swing.plaf

Examples of javax.swing.plaf.ListUI


    @Override
    public Component getListCellRendererComponent(JList list, Object value,
                                                  int index, boolean isSelected, boolean cellHasFocus) {
        this.setComponentOrientation(list.getComponentOrientation());

        ListUI listUI = list.getUI();
        if (listUI instanceof SubstanceListUI) {
            SubstanceListUI ui = (SubstanceListUI) listUI;
            ComponentState state = ui.getCellState(index, this);
            ComponentState prevState = ui.getPrevCellState(index, this);
View Full Code Here


        assertEquals(2, list.getAnchorSelectionIndex());
        assertEquals(2, list.getSelectionModel().getAnchorSelectionIndex());
    }

    public void testGetCellBounds() throws Exception {
        list.setUI(new ListUI() {
            @Override
            public Point indexToLocation(final JList arg0, final int arg1) {
                return null;
            }
View Full Code Here

                MouseEvent.MOUSE_ENTERED, EventQueue.getMostRecentEventTime(), 0, 5, 5, 0,
                false)));
    }

    public void testGetSetUpdateUI() throws Exception {
        ListUI ui = new ListUI() {
            @Override
            public Point indexToLocation(final JList arg0, final int arg1) {
                return null;
            }
View Full Code Here

        assertEquals(0, list.getVisibleRowCount());
        assertTrue(changeListener.isChanged("visibleRowCount"));
    }

    public void testIndexToLocation() throws Exception {
        ListUI ui = new ListUI() {
            @Override
            public Point indexToLocation(final JList arg0, final int arg1) {
                return new Point(10, 20);
            }
View Full Code Here

        assertFalse(list.isSelectionEmpty());
        assertFalse(list.getSelectionModel().isSelectionEmpty());
    }

    public void testLocationToIndex() throws Exception {
        ListUI ui = new ListUI() {
            @Override
            public Point indexToLocation(final JList arg0, final int arg1) {
                return null;
            }
View Full Code Here

  @Override
  public Component getListCellRendererComponent(JList list, Object value,
      int index, boolean isSelected, boolean cellHasFocus) {
    this.setComponentOrientation(list.getComponentOrientation());

    ListUI listUI = list.getUI();
    if (listUI instanceof SubstanceListUI) {
      SubstanceListUI ui = (SubstanceListUI) listUI;

      StateTransitionTracker.ModelStateInfo modelStateInfo = ui
          .getModelStateInfo(index, this);
View Full Code Here

      int index, boolean isSelected, boolean cellHasFocus) {

    JComponent result = (JComponent) super.getListCellRendererComponent(
        list, value, index, isSelected, cellHasFocus);

    ListUI baseListUI = list.getUI();
    ComboBoxUI baseComboUI = combo.getUI();
    if ((baseListUI instanceof SubstanceListUI)
        && (baseComboUI instanceof SubstanceComboBoxUI)) {
      SubstanceListUI listUI = (SubstanceListUI) baseListUI;
      SubstanceComboBoxUI comboUI = (SubstanceComboBoxUI) baseComboUI;
View Full Code Here

            setIcon ( null );
            setText ( value == null ? "" : value.toString () );
        }

        // Border
        final ListUI lui = list.getUI ();
        final int sw = lui instanceof WebListUI ? ( ( WebListUI ) lui ).getSelectionShadeWidth () : WebListStyle.selectionShadeWidth;
        setMargin ( sw + 2, sw + ( getIcon () != null ? 2 : 4 ), sw + 2, sw + 4 );

        // Orientation
        setComponentOrientation ( list.getComponentOrientation () );
View Full Code Here

        // Selection and text
        renderer.setText ( data.getUserObject () == null ? "" : data.getUserObject ().toString () );

        // Border
        final ListUI lui = list.getUI ();
        final int sw = lui instanceof WebListUI ? ( ( WebListUI ) lui ).getSelectionShadeWidth () : WebListStyle.selectionShadeWidth;
        renderer.setMargin ( sw + 2, sw + 2, sw + 2, sw + 4 );

        // Orientation
        renderer.setComponentOrientation ( list.getComponentOrientation () );
View Full Code Here

            protected JList createList ()
            {
                final JList list = super.createList ();
                //  list.setOpaque ( false );

                final ListUI listUI = list.getUI ();
                if ( listUI instanceof WebListUI )
                {
                    final WebListUI webListUI = ( WebListUI ) listUI;
                    webListUI.setHighlightRolloverCell ( false );
                    webListUI.setDecorateSelection ( false );
View Full Code Here

TOP

Related Classes of javax.swing.plaf.ListUI

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.