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


      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

        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

         * move the highlight and current selection around the radio lists.
         */
        public void actionPerformed(ActionEvent e) {
            String name = getName();
            JList list = (JList)e.getSource();
            ListUI ui = list.getUI();
            if(ui instanceof RadioListUI) {
                RadioListUI currUI = (RadioListUI)ui;
                int index = list.getLeadSelectionIndex();
                int size = list.getModel().getSize();
                int currentRow = currUI.convertModelToRow(index);
View Full Code Here

         * move the highlight and current selection around the radio lists.
         */
        public void actionPerformed(ActionEvent e) {
            String name = getName();
            JList list = (JList)e.getSource();
            ListUI ui = list.getUI();
            if(ui instanceof RadioListUI) {
                RadioListUI currUI = (RadioListUI)ui;
                int index = list.getLeadSelectionIndex();
                int size = list.getModel().getSize();
                int currentRow = currUI.convertModelToRow(index);
View Full Code Here

         * move the highlight and current selection around the radio lists.
         */
        public void actionPerformed(ActionEvent e) {
            String name = getName();
            JList list = (JList)e.getSource();
            ListUI ui = list.getUI();
            if(ui instanceof RadioListUI) {
                RadioListUI currUI = (RadioListUI)ui;
                int index = list.getLeadSelectionIndex();
                int size = list.getModel().getSize();
                int currentRow = currUI.convertModelToRow(index);
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;
      ComponentState state = ui.getCellState(index, this);
      ComponentState prevState = ui.getPrevCellState(index, this);
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.