Package javax.swing

Examples of javax.swing.DefaultListCellRenderer$UIResource


        JPanel messagePanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
        messagePanel.add(description);
       
        JList list = new JList(statuses.toArray());
        list.setOpaque(false);
        list.setCellRenderer(new DefaultListCellRenderer() {
           
            @Override
            public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
                    boolean cellHasFocus) {
                PluginStartupStatus status = (PluginStartupStatus) value;
View Full Code Here


        DBHelper.closeConnection();
        return new DefaultComboBoxModel(items);
    }
   
    public static ListCellRenderer getListCellRenderer() {
        return new DefaultListCellRenderer(){
            @Override
            public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
                Component renderer = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
                if (renderer instanceof JLabel && value instanceof Client) {
                    ((JLabel) renderer).setText(((Client) value).getName().toString());
View Full Code Here

        DBHelper.closeConnection();
        return listModel;
    }

    public static ListCellRenderer getListCellRenderer() {
        return new DefaultListCellRenderer() {
            @Override
            public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
                Component renderer = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
                if (renderer instanceof JLabel && value instanceof Staff) {
                    ((JLabel) renderer).setText(((Staff) value).getUsername().toString());
View Full Code Here

                    GemEntity gemEntity = (GemEntity) drawFnCombo.getSelectedItem();
                    currentDrawExpr = Expr.makeGemCall(gemEntity.getName());
                    repaint();
                }
            });
        drawFnCombo.setRenderer(new DefaultListCellRenderer() {
            private static final long serialVersionUID = -2433581223714718290L;

                @Override
                public Component getListCellRendererComponent(
                        JList list,
View Full Code Here

        add(getEnumeratedValueScrollPane(), "Center");

        // Make sure that this EnumeratedValueEditor handles user's commit or cancel input.
        getEnumeratedValueList().addKeyListener(new ValueEditorKeyListener());

        getEnumeratedValueList().setCellRenderer(new DefaultListCellRenderer() {
            private static final long serialVersionUID = -6142474728739005212L;

                @Override
                public Component getListCellRendererComponent(JList list,
                                                              Object value,
View Full Code Here

    /**
     * @return the list cell renderer to use for the related features list
     */
    private DefaultListCellRenderer createFeatureListRenderer() {
       
        return new DefaultListCellRenderer() {
        
            private static final long serialVersionUID = -1761318607899607831L;

            @Override
            public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
View Full Code Here

    });
    log.trace("Lista con " + items.length + " objetos");
    for (Object obj : items) {
      ((DefaultListModel) list.getModel()).addElement(obj);
    }
    list.setCellRenderer(new DefaultListCellRenderer() {

      private static final long serialVersionUID = -987995602141400182L;

      @Override
      public Component getListCellRendererComponent(JList list,
View Full Code Here

    });
    log.trace("Lista con " + items.length + " objetos");
    for (Object obj : items) {
      ((DefaultListModel) list.getModel()).addElement(obj);
    }
    list.setCellRenderer(new DefaultListCellRenderer() {

      private static final long serialVersionUID = -987995602141400182L;

      @Override
      public Component getListCellRendererComponent(JList list,
View Full Code Here

        MultiColumnBrowserRenderer() {

            leafRenderer = CellRenderers.listRenderer();

            nonLeafTextRenderer = new DefaultListCellRenderer() {
                @Override
                public Border getBorder() {
                    return null;
                }
            };
View Full Code Here

                                                    new StochasticUniversalSampling(),
                                                    new TournamentSelection(new Probability(0.95)),
                                                    new TruncationSelection(0.5)};
     
      selectionCombo = new JComboBox(selectionStrategies);
      selectionCombo.setRenderer(new DefaultListCellRenderer() {
        @Override
        public Component getListCellRendererComponent(JList list,
                                                      Object value,
                                                      int index,
                                                      boolean isSelected,
View Full Code Here

TOP

Related Classes of javax.swing.DefaultListCellRenderer$UIResource

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.