Package javax.swing

Examples of javax.swing.DefaultListCellRenderer$UIResource


    private Component getAssertionList() {
        assertionList = new JList();
        assertionList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        assertionList.setBorder(BorderFactory.createTitledBorder("Custom Assertions"));
        model = new AssertionListModel();
        assertionList.setCellRenderer(new DefaultListCellRenderer() {
            private static final long serialVersionUID = 1L;

            public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
                    boolean cellHasFocus) {
                String name = ((String[]) value)[0];
View Full Code Here


    private JList getCheckList() {
        checkList = new JList();
        checkList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        checkList.setBorder(BorderFactory.createTitledBorder("Check Lists"));
        model = new CheckListFileModel();
        checkList.setCellRenderer(new DefaultListCellRenderer() {
            private static final long serialVersionUID = 1L;

            public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
                    boolean cellHasFocus) {
                String name = ((File) value).getName();
View Full Code Here

        String[] lines = { "Select a Marathon Project Directory" };
        BannerPanel.Sheet sheet = new BannerPanel.Sheet("Create and manage configuration", lines, BANNER);
        bannerPanel.addSheet(sheet, "main");
        getContentPane().add(bannerPanel, BorderLayout.NORTH);
        getContentPane().add(getSelectionPanel());
        dirName.setRenderer(new DefaultListCellRenderer() {
            private static final long serialVersionUID = 1L;

            public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
                    boolean cellHasFocus) {
                JLabel comp = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
View Full Code Here

    private JList getCheckList() {
        checkList = new JList();
        checkList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        checkList.setBorder(BorderFactory.createTitledBorder("Check Lists"));
        model = new CheckListFileModel();
        checkList.setCellRenderer(new DefaultListCellRenderer() {
            private static final long serialVersionUID = 1L;

            @Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
                    boolean cellHasFocus) {
                String name = ((File) value).getName();
View Full Code Here

        cbModel.addElement(ChecksumUtil.SHA_256);
        cbModel.addElement(ChecksumUtil.SHA_384);
        cbModel.addElement(ChecksumUtil.SHA_512);
       
        cb.setModel(cbModel);
        cb.setRenderer(new DefaultListCellRenderer() {
            public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
                super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
                String txt = "";
                if (value==ChecksumUtil.MD2) { txt="MD2"; }
                if (value==ChecksumUtil.MD5) { txt="MD5"; }
View Full Code Here

        resultStyle = new SimpleAttributeSet();
        StyleConstants.setItalic(resultStyle, true);
        StyleConstants.setForeground(resultStyle, new Color(0x20, 0x4a, 0x87));
       
        completeCombo = new JComboBox();
        completeCombo.setRenderer(new DefaultListCellRenderer()); // no silly ticks!
        completePopup = new BasicComboPopup(completeCombo);
       
        if (message != null) {
            final MutableAttributeSet messageStyle = new SimpleAttributeSet();
            StyleConstants.setBackground(messageStyle, area.getForeground());
View Full Code Here

        boolean canChangeUser = RoleAccess.canChangeOwner(getManifestedComponent(), currentUser);
        owner.setFocusable(canChangeUser);
        owner.setEnabled(canChangeUser);
        if (!canChangeUser) {
            owner.setRenderer(new DefaultListCellRenderer() {
                public void paint(Graphics g) {
                    setBackground(bgUIColor);
                    setForeground(fgUIColor);
                    super.paint(g);
                }
View Full Code Here

        displayName.setEditable(allowEdit);


        owner.setFocusable(false);
        owner.setEnabled(false);
        owner.setRenderer(new DefaultListCellRenderer() {
            public void paint(Graphics g) {
                setBackground(bgUIColor);
                setForeground(fgUIColor);
                super.paint(g);
            }
View Full Code Here

                jComponent.setEnabled(true);
            } else {
                jComponent.setEnabled(false);
                jComponent.setFocusable(false);
             
                combo.setRenderer(new DefaultListCellRenderer() {
                    public void paint(Graphics g) {
                        setBackground(bgUIColor);
                        setForeground(fgUIColor);
                        super.paint(g);
                    }
View Full Code Here

        displayNameAndGoPanel.add(goButton, BorderLayout.EAST);
       
        listModel = new DefaultListModel();
        list = new JList(listModel);
        list.getAccessibleContext().setAccessibleName("Search Result List");
        list.setCellRenderer(new DefaultListCellRenderer() {
            @Override
            public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
                    boolean cellHasFocus) {
                ComponentInfo ci = (ComponentInfo) value;
                JLabel label = (JLabel) super.getListCellRendererComponent(list, ci.name, index, isSelected, cellHasFocus);
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.