Java 类javax.swing.plaf.ListUI 实例源码

项目:powertext    文件:AutoCompletePopupWindow.java   
@Override
public void setUI(ListUI ui) {
    if (Util.getUseSubstanceRenderers() &&
            SUBSTANCE_LIST_UI.equals(ui.getClass().getName())) {
        // Substance requires its special ListUI be installed for
        // its renderers to actually render (!), but long completion
        // lists (e.g. PHPCompletionProvider in RSTALanguageSupport)
        // will simply populate too slowly on initial display (when
        // calculating preferred size of all items), so in this case
        // we give a prototype cell value.
        CompletionProvider p = ac.getCompletionProvider();
        BasicCompletion bc = new BasicCompletion(p, "Hello world");
        setPrototypeCellValue(bc);
    }
    else {
        // Our custom UI that is faster for long HTML completion lists.
        ui = new FastListUI();
        setPrototypeCellValue(null);
    }
    super.setUI(ui);
}
项目:ftc    文件:AutoCompletePopupWindow.java   
@Override
public void setUI(ListUI ui) {
    if (Util.getUseSubstanceRenderers() && SUBSTANCE_LIST_UI.equals(ui.getClass().getName())) {
        // Substance requires its special ListUI be installed for
        // its renderers to actually render (!), but long completion
        // lists (e.g. PHPCompletionProvider in RSTALanguageSupport)
        // will simply populate too slowly on initial display (when
        // calculating preferred size of all items), so in this case
        // we give a prototype cell value.
        CompletionProvider p = ac.getCompletionProvider();
        BasicCompletion bc = new BasicCompletion(p, "Hello world");
        setPrototypeCellValue(bc);
    } else {
        // Our custom UI that is faster for long HTML completion lists.
        ui = new FastListUI();
        setPrototypeCellValue(null);
    }
    super.setUI(ui);
}
项目:ESPlorer    文件:AutoCompletePopupWindow.java   
@Override
public void setUI(ListUI ui) {
    if (Util.getUseSubstanceRenderers() &&
            SUBSTANCE_LIST_UI.equals(ui.getClass().getName())) {
        // Substance requires its special ListUI be installed for
        // its renderers to actually render (!), but long completion
        // lists (e.g. PHPCompletionProvider in RSTALanguageSupport)
        // will simply populate too slowly on initial display (when
        // calculating preferred size of all items), so in this case
        // we give a prototype cell value.
        CompletionProvider p = ac.getCompletionProvider();
        BasicCompletion bc = new BasicCompletion(p, "Hello world");
        setPrototypeCellValue(bc);
    }
    else {
        // Our custom UI that is faster for long HTML completion lists.
        ui = new FastListUI();
        setPrototypeCellValue(null);
    }
    super.setUI(ui);
}
项目:ESPlorer    文件:AutoCompletePopupWindow.java   
@Override
public void setUI(ListUI ui) {
    if (Util.getUseSubstanceRenderers() &&
            SUBSTANCE_LIST_UI.equals(ui.getClass().getName())) {
        // Substance requires its special ListUI be installed for
        // its renderers to actually render (!), but long completion
        // lists (e.g. PHPCompletionProvider in RSTALanguageSupport)
        // will simply populate too slowly on initial display (when
        // calculating preferred size of all items), so in this case
        // we give a prototype cell value.
        CompletionProvider p = ac.getCompletionProvider();
        BasicCompletion bc = new BasicCompletion(p, "Hello world");
        setPrototypeCellValue(bc);
    }
    else {
        // Our custom UI that is faster for long HTML completion lists.
        ui = new FastListUI();
        setPrototypeCellValue(null);
    }
    super.setUI(ui);
}
项目:OpenJSharp    文件:MultiListUI.java   
/**
 * Invokes the <code>locationToIndex</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public int locationToIndex(JList a, Point b) {
    int returnValue =
        ((ListUI) (uis.elementAt(0))).locationToIndex(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((ListUI) (uis.elementAt(i))).locationToIndex(a,b);
    }
    return returnValue;
}
项目:OpenJSharp    文件:MultiListUI.java   
/**
 * Invokes the <code>indexToLocation</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public Point indexToLocation(JList a, int b) {
    Point returnValue =
        ((ListUI) (uis.elementAt(0))).indexToLocation(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((ListUI) (uis.elementAt(i))).indexToLocation(a,b);
    }
    return returnValue;
}
项目:OpenJSharp    文件:MultiListUI.java   
/**
 * Invokes the <code>getCellBounds</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public Rectangle getCellBounds(JList a, int b, int c) {
    Rectangle returnValue =
        ((ListUI) (uis.elementAt(0))).getCellBounds(a,b,c);
    for (int i = 1; i < uis.size(); i++) {
        ((ListUI) (uis.elementAt(i))).getCellBounds(a,b,c);
    }
    return returnValue;
}
项目:jdk8u-jdk    文件:MultiListUI.java   
/**
 * Invokes the <code>locationToIndex</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public int locationToIndex(JList a, Point b) {
    int returnValue =
        ((ListUI) (uis.elementAt(0))).locationToIndex(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((ListUI) (uis.elementAt(i))).locationToIndex(a,b);
    }
    return returnValue;
}
项目:jdk8u-jdk    文件:MultiListUI.java   
/**
 * Invokes the <code>indexToLocation</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public Point indexToLocation(JList a, int b) {
    Point returnValue =
        ((ListUI) (uis.elementAt(0))).indexToLocation(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((ListUI) (uis.elementAt(i))).indexToLocation(a,b);
    }
    return returnValue;
}
项目:jdk8u-jdk    文件:MultiListUI.java   
/**
 * Invokes the <code>getCellBounds</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public Rectangle getCellBounds(JList a, int b, int c) {
    Rectangle returnValue =
        ((ListUI) (uis.elementAt(0))).getCellBounds(a,b,c);
    for (int i = 1; i < uis.size(); i++) {
        ((ListUI) (uis.elementAt(i))).getCellBounds(a,b,c);
    }
    return returnValue;
}
项目:openjdk-jdk10    文件:MultiListUI.java   
/**
 * Invokes the <code>locationToIndex</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public int locationToIndex(JList<?> a, Point b) {
    int returnValue =
        ((ListUI) (uis.elementAt(0))).locationToIndex(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((ListUI) (uis.elementAt(i))).locationToIndex(a,b);
    }
    return returnValue;
}
项目:openjdk-jdk10    文件:MultiListUI.java   
/**
 * Invokes the <code>indexToLocation</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public Point indexToLocation(JList<?> a, int b) {
    Point returnValue =
        ((ListUI) (uis.elementAt(0))).indexToLocation(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((ListUI) (uis.elementAt(i))).indexToLocation(a,b);
    }
    return returnValue;
}
项目:openjdk-jdk10    文件:MultiListUI.java   
/**
 * Invokes the <code>getCellBounds</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public Rectangle getCellBounds(JList<?> a, int b, int c) {
    Rectangle returnValue =
        ((ListUI) (uis.elementAt(0))).getCellBounds(a,b,c);
    for (int i = 1; i < uis.size(); i++) {
        ((ListUI) (uis.elementAt(i))).getCellBounds(a,b,c);
    }
    return returnValue;
}
项目:openjdk-jdk10    文件:JListOperator.java   
/**
 * Maps {@code JList.getUI()} through queue
 */
public ListUI getUI() {
    return (runMapping(new MapAction<ListUI>("getUI") {
        @Override
        public ListUI map() {
            return ((JList) getSource()).getUI();
        }
    }));
}
项目:openjdk-jdk10    文件:JListOperator.java   
/**
 * Maps {@code JList.setUI(ListUI)} through queue
 */
public void setUI(final ListUI listUI) {
    runMapping(new MapVoidAction("setUI") {
        @Override
        public void map() {
            ((JList) getSource()).setUI(listUI);
        }
    });
}
项目:openjdk9    文件:MultiListUI.java   
/**
 * Invokes the <code>locationToIndex</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public int locationToIndex(JList<?> a, Point b) {
    int returnValue =
        ((ListUI) (uis.elementAt(0))).locationToIndex(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((ListUI) (uis.elementAt(i))).locationToIndex(a,b);
    }
    return returnValue;
}
项目:openjdk9    文件:MultiListUI.java   
/**
 * Invokes the <code>indexToLocation</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public Point indexToLocation(JList<?> a, int b) {
    Point returnValue =
        ((ListUI) (uis.elementAt(0))).indexToLocation(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((ListUI) (uis.elementAt(i))).indexToLocation(a,b);
    }
    return returnValue;
}
项目:openjdk9    文件:MultiListUI.java   
/**
 * Invokes the <code>getCellBounds</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public Rectangle getCellBounds(JList<?> a, int b, int c) {
    Rectangle returnValue =
        ((ListUI) (uis.elementAt(0))).getCellBounds(a,b,c);
    for (int i = 1; i < uis.size(); i++) {
        ((ListUI) (uis.elementAt(i))).getCellBounds(a,b,c);
    }
    return returnValue;
}
项目:openjdk9    文件:JListOperator.java   
/**
 * Maps {@code JList.getUI()} through queue
 */
public ListUI getUI() {
    return (runMapping(new MapAction<ListUI>("getUI") {
        @Override
        public ListUI map() {
            return ((JList) getSource()).getUI();
        }
    }));
}
项目:openjdk9    文件:JListOperator.java   
/**
 * Maps {@code JList.setUI(ListUI)} through queue
 */
public void setUI(final ListUI listUI) {
    runMapping(new MapVoidAction("setUI") {
        @Override
        public void map() {
            ((JList) getSource()).setUI(listUI);
        }
    });
}
项目:Java8CN    文件:MultiListUI.java   
/**
 * Invokes the <code>locationToIndex</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public int locationToIndex(JList a, Point b) {
    int returnValue =
        ((ListUI) (uis.elementAt(0))).locationToIndex(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((ListUI) (uis.elementAt(i))).locationToIndex(a,b);
    }
    return returnValue;
}
项目:Java8CN    文件:MultiListUI.java   
/**
 * Invokes the <code>indexToLocation</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public Point indexToLocation(JList a, int b) {
    Point returnValue =
        ((ListUI) (uis.elementAt(0))).indexToLocation(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((ListUI) (uis.elementAt(i))).indexToLocation(a,b);
    }
    return returnValue;
}
项目:Java8CN    文件:MultiListUI.java   
/**
 * Invokes the <code>getCellBounds</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public Rectangle getCellBounds(JList a, int b, int c) {
    Rectangle returnValue =
        ((ListUI) (uis.elementAt(0))).getCellBounds(a,b,c);
    for (int i = 1; i < uis.size(); i++) {
        ((ListUI) (uis.elementAt(i))).getCellBounds(a,b,c);
    }
    return returnValue;
}
项目:jdk8u_jdk    文件:MultiListUI.java   
/**
 * Invokes the <code>locationToIndex</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public int locationToIndex(JList a, Point b) {
    int returnValue =
        ((ListUI) (uis.elementAt(0))).locationToIndex(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((ListUI) (uis.elementAt(i))).locationToIndex(a,b);
    }
    return returnValue;
}
项目:jdk8u_jdk    文件:MultiListUI.java   
/**
 * Invokes the <code>indexToLocation</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public Point indexToLocation(JList a, int b) {
    Point returnValue =
        ((ListUI) (uis.elementAt(0))).indexToLocation(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((ListUI) (uis.elementAt(i))).indexToLocation(a,b);
    }
    return returnValue;
}
项目:jdk8u_jdk    文件:MultiListUI.java   
/**
 * Invokes the <code>getCellBounds</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public Rectangle getCellBounds(JList a, int b, int c) {
    Rectangle returnValue =
        ((ListUI) (uis.elementAt(0))).getCellBounds(a,b,c);
    for (int i = 1; i < uis.size(); i++) {
        ((ListUI) (uis.elementAt(i))).getCellBounds(a,b,c);
    }
    return returnValue;
}
项目:lookaside_java-1.8.0-openjdk    文件:MultiListUI.java   
/**
 * Invokes the <code>locationToIndex</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public int locationToIndex(JList a, Point b) {
    int returnValue =
        ((ListUI) (uis.elementAt(0))).locationToIndex(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((ListUI) (uis.elementAt(i))).locationToIndex(a,b);
    }
    return returnValue;
}
项目:lookaside_java-1.8.0-openjdk    文件:MultiListUI.java   
/**
 * Invokes the <code>indexToLocation</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public Point indexToLocation(JList a, int b) {
    Point returnValue =
        ((ListUI) (uis.elementAt(0))).indexToLocation(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((ListUI) (uis.elementAt(i))).indexToLocation(a,b);
    }
    return returnValue;
}
项目:lookaside_java-1.8.0-openjdk    文件:MultiListUI.java   
/**
 * Invokes the <code>getCellBounds</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public Rectangle getCellBounds(JList a, int b, int c) {
    Rectangle returnValue =
        ((ListUI) (uis.elementAt(0))).getCellBounds(a,b,c);
    for (int i = 1; i < uis.size(); i++) {
        ((ListUI) (uis.elementAt(i))).getCellBounds(a,b,c);
    }
    return returnValue;
}
项目:javify    文件:JList.java   
/**
 * Returns the bounds of the rectangle that encloses both list cells
 * with index0 and index1.
 *
 * @param index0 the index of the first cell
 * @param index1 the index of the second cell
 *
 * @return  the bounds of the rectangle that encloses both list cells
 *     with index0 and index1, <code>null</code> if one of the indices is
 *     not valid
 */
public Rectangle getCellBounds(int index0, int index1)
{
  ListUI ui = getUI();
  Rectangle bounds = null;
  if (ui != null)
    {
      bounds = ui.getCellBounds(this, index0, index1);
    }
  // When the UI is null, this method also returns null in the RI.
  return bounds;
}
项目:jvm-stm    文件:JList.java   
/**
 * Returns the bounds of the rectangle that encloses both list cells
 * with index0 and index1.
 *
 * @param index0 the index of the first cell
 * @param index1 the index of the second cell
 *
 * @return  the bounds of the rectangle that encloses both list cells
 *     with index0 and index1, <code>null</code> if one of the indices is
 *     not valid
 */
public Rectangle getCellBounds(int index0, int index1)
{
  ListUI ui = getUI();
  Rectangle bounds = null;
  if (ui != null)
    {
      bounds = ui.getCellBounds(this, index0, index1);
    }
  // When the UI is null, this method also returns null in the RI.
  return bounds;
}
项目:swingx    文件:JXList.java   
/**
 * {@inheritDoc} <p>
 * 
 * Overridden to update renderer and Highlighters.
 */
@Override
public void updateUI() {
    // PENDING JW: temporary during dev to quickly switch between default and custom ui
    if (getUIClassID() == super.getUIClassID()) {
        super.updateUI();
    } else {    
        setUI((ListUI) LookAndFeelAddons.getUI(this, ListUI.class));
    }
    updateRendererUI();
    updateHighlighterUI();
}
项目:umple    文件:PaletteSwatchesChooser.java   
@Override
protected void buildChooser() {
    initComponents();
    setUI(PalettePanelUI.createUI(this));
    jList.setUI((ListUI) PaletteListUI.createUI(jList));
    Object[] byRows=HSB_COLORS_AS_RGB.toArray();
    Object[] byColumns=new Object[byRows.length];
    for (int y=0,my=byRows.length/HSB_COLORS_AS_RGB_COLUMN_COUNT;y<my;y++) {
    for (int x=0;x< HSB_COLORS_AS_RGB_COLUMN_COUNT;x++) {
        if (x*my+y<byColumns.length)
            byColumns[x*my+y]=byRows[y*HSB_COLORS_AS_RGB_COLUMN_COUNT+x];
    }
    }
    byColumns[byColumns.length-1]=byRows[byRows.length-1];
    jList.setListData(byColumns);
    jList.setVisibleRowCount(HSB_COLORS_AS_RGB.size() / HSB_COLORS_AS_RGB_COLUMN_COUNT);
    jList.addListSelectionListener(new ListSelectionListener() {

        @Override
        public void valueChanged(ListSelectionEvent e) {
            if (updateRecursion++ == 0) {
                ColorIcon item = (ColorIcon) jList.getSelectedValue();
                setColorToModel(item == null ? null : item.getColor());
            }
            updateRecursion--;
        }
    });
}
项目:infobip-open-jdk-8    文件:MultiListUI.java   
/**
 * Invokes the <code>locationToIndex</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public int locationToIndex(JList a, Point b) {
    int returnValue =
        ((ListUI) (uis.elementAt(0))).locationToIndex(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((ListUI) (uis.elementAt(i))).locationToIndex(a,b);
    }
    return returnValue;
}
项目:infobip-open-jdk-8    文件:MultiListUI.java   
/**
 * Invokes the <code>indexToLocation</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public Point indexToLocation(JList a, int b) {
    Point returnValue =
        ((ListUI) (uis.elementAt(0))).indexToLocation(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((ListUI) (uis.elementAt(i))).indexToLocation(a,b);
    }
    return returnValue;
}
项目:infobip-open-jdk-8    文件:MultiListUI.java   
/**
 * Invokes the <code>getCellBounds</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public Rectangle getCellBounds(JList a, int b, int c) {
    Rectangle returnValue =
        ((ListUI) (uis.elementAt(0))).getCellBounds(a,b,c);
    for (int i = 1; i < uis.size(); i++) {
        ((ListUI) (uis.elementAt(i))).getCellBounds(a,b,c);
    }
    return returnValue;
}
项目:jdk8u-dev-jdk    文件:MultiListUI.java   
/**
 * Invokes the <code>locationToIndex</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public int locationToIndex(JList a, Point b) {
    int returnValue =
        ((ListUI) (uis.elementAt(0))).locationToIndex(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((ListUI) (uis.elementAt(i))).locationToIndex(a,b);
    }
    return returnValue;
}
项目:jdk8u-dev-jdk    文件:MultiListUI.java   
/**
 * Invokes the <code>indexToLocation</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public Point indexToLocation(JList a, int b) {
    Point returnValue =
        ((ListUI) (uis.elementAt(0))).indexToLocation(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((ListUI) (uis.elementAt(i))).indexToLocation(a,b);
    }
    return returnValue;
}
项目:jdk8u-dev-jdk    文件:MultiListUI.java   
/**
 * Invokes the <code>getCellBounds</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public Rectangle getCellBounds(JList a, int b, int c) {
    Rectangle returnValue =
        ((ListUI) (uis.elementAt(0))).getCellBounds(a,b,c);
    for (int i = 1; i < uis.size(); i++) {
        ((ListUI) (uis.elementAt(i))).getCellBounds(a,b,c);
    }
    return returnValue;
}
项目:jdk7-jdk    文件:MultiListUI.java   
/**
 * Invokes the <code>locationToIndex</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public int locationToIndex(JList a, Point b) {
    int returnValue =
        ((ListUI) (uis.elementAt(0))).locationToIndex(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((ListUI) (uis.elementAt(i))).locationToIndex(a,b);
    }
    return returnValue;
}