<< Back to previous view

[SWINGX-1579] NumberFormatExt implementation is inconsistent Created: 25/Oct/13  Updated: 25/Oct/13

Status: Open
Project: swingx
Component/s: None
Affects Version/s: 1.6.5-1
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: dsmania Assignee: Unassigned
Resolution: Unresolved Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: dsmania

 Description   

NumberFormatExt is implemented a bit inconsistently:

  • In one hand it's a wrapper, which makes the notation "Ext" a bit imprecise, as it requires another NumberFormat to delegate the format and parse methods.
  • The wrapper is incomplete and does not provide access to the delegated NumberFormat

What's the consequence of this? For instance:

NumberFormat nf = NumberFormat.getInstance();
nf.setGroupingUsed(false);
NumberFormatExt nfe = new NumberFormatExt(nf);
nfe.setGroupingUsed(true);

would not be using grouping actually.

In my opinion, this class would be either fully delegating all methods on the child or (better, imo) properly extending the class and delegating on super all those methods not to be overriden.






[SWINGX-1574] Adding JXToggleButton Created: 19/Sep/13  Updated: 19/Sep/13

Status: Open
Project: swingx
Component/s: None
Affects Version/s: 1.6.5-1
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: dsmania Assignee: Unassigned
Resolution: Unresolved Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: toggle button
Participants: dsmania

 Description   

JXButton adds the ability to use painters on a JButton but this feature is unavailable for JToggleButton and would be desirable. JToggleButton extends from AbstractButton as JButton does, so it's not possible to make JXButton togglable directly.

Also, as a toggle button has an state (selected) that is not representative for an action button, adding painters for that state would be an interesting feature, the same way you can use setSelectedIcon on AbstractButton.

Posible solutions:
1) Add the ability on JXButton to make it togglable, making the need of a different class not needed. This makes a lot of sense since AbstractButton already has the theoretical ability to become togglable as it relies on the "selected" property, which JButton ignores. It's highly curious that AbstractButton has the method setSelectedIcon() but has no effect on JButton. This approach may rely on having a Togglable interface to be implemented by the component and an extended model, having a wrapper for standard models.

2) Extend JToggleButton replicating the code present in JXButton. This is not very desirable as mantaining the code is trickier and is not a good design.

3) Implement a XButtonSupport with the code added in SwingX to any button and make JXButton and JXToggleButton delegate on it.

From my humble point of view, the first alternative looks more solid and enhances original design, although breaks the original design in Swing.



 Comments   
Comment by dsmania [ 19/Sep/13 11:49 AM ]

Sorry, priority should have been set to "minor", can't change it now myself.





[SWINGX-1559] Typo in pom.xml variable name Created: 15/May/13  Updated: 18/Jun/13  Resolved: 18/Jun/13

Status: Resolved
Project: swingx
Component/s: None
Affects Version/s: 1.6.6
Fix Version/s: 1.6.6

Type: Bug Priority: Trivial
Reporter: dsmania Assignee: Karl Schaefer
Resolution: Fixed Votes: 0
Remaining Estimate: 1 minute
Time Spent: Not Specified
Original Estimate: 1 minute

Tags: maven
Participants: dsmania and Karl Schaefer

 Description   

This is a very small mistake has no effect in the library, but seems to be one of those little poltergeists that annoys in the development:
in swingx-all/pom.xml at line 15 you can read:
<project.generatedDependencies>${project.generatedSourcesDirectoy}/dependencies</project.generatedDependencies>
Notice that "generatedSourcesDirectoy" is missing an 'r' just before the last 'y' for referencing the proper directoRy variable.
This seems to result only in using the wrong directory, but as long as the library is out and working, blocks nothing the development.



 Comments   
Comment by Karl Schaefer [ 18/Jun/13 02:02 PM ]

Fix it. Also in swingx-all POM.





[SWINGX-1538] ClassCastException when Collapsible Pane content extends certain classes Created: 08/Jan/13  Updated: 08/Jan/13

Status: Open
Project: swingx
Component/s: TaskPane and CollapsiblePane
Affects Version/s: 1.6.4
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: dsmania Assignee: Karl Schaefer
Resolution: Unresolved Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Java SE 6 and 7


Tags: jxcollapsiblepane
Participants: dsmania and Karl Schaefer

 Description   

When certain components are set as the content for a JXCollapsiblePane, and somethimes only under certain Look&Feel's, a ClassCastException is thrown when trying to paint the border for the component:

  • Any class that extends AbstractButton under Nimbus or Metal
  • JSplitPane under any Look&Feel
  • JXTaskPane under any Look&Feel
    Also this problem doesn't get triggered always but I'm not able to isolate the concrete circumstances, neither the trace seems representative to me. I've attached a program that allows the test of this scenario with several components.
    There's an easy workaround which is using the content pane provided or simply setting any JPanel, so is not an stuck problem, but I think it's better to report as it might have some collateral effects.


 Comments   
Comment by dsmania [ 08/Jan/13 05:34 PM ]

Since I'm not able to attach files (or I am blind to see where the option is) here's the code for the test:

CollapsiblePaneContentTest.java
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Image;
import java.awt.event.ActionEvent;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.net.URL;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Hashtable;
import javax.swing.*;
import javax.swing.tree.DefaultMutableTreeNode;
import org.jdesktop.swingx.*;
import org.jdesktop.swingx.action.AbstractActionExt;
import org.jdesktop.swingx.painter.CheckerboardPainter;
import org.jdesktop.swingx.tips.DefaultTipOfTheDayModel;
import org.jdesktop.swingx.tips.TipOfTheDayModel;
import org.jdesktop.swingx.treetable.DefaultMutableTreeTableNode;
import org.jdesktop.swingx.treetable.DefaultTreeTableModel;
import org.jdesktop.swingx.treetable.TreeTableModel;

public class CollapsiblePaneContentTest extends JXPanel {

    private static final long serialVersionUID = 1L;

    public CollapsiblePaneContentTest() {
        super(new VerticalLayout());
        super.setBackgroundPainter(new CheckerboardPainter());

        final JXCollapsiblePane collapsiblePane = new JXCollapsiblePane();
        collapsiblePane.setCollapsed(false);

        final JXComboBox componentsCombo = new JXComboBox(new JComponent[] {
                new JButton("A button"),
                new JCheckBox("A check box"),
                new JComboBox(new String[] { "A combo box", "is what", "this is" }),
                new JColorChooser(),
                newJDesktopPane(),
                new JEditorPane("text/html", "<html>An <b>editor pane</b></html>"),
                new JFormattedTextField("A formatted text field"),
                new JLabel("A label"),
                new JList(new String[] { "A list", "is what", "this is" }),
                new JOptionPane("An option pane", JOptionPane.INFORMATION_MESSAGE, JOptionPane.OK_CANCEL_OPTION),
                new JPanel(),
                new JProgressBar(new DefaultBoundedRangeModel(50, 10, 0, 100)),
                new JRadioButton("A radio button"),
                new JScrollPane(new JXLabel("A scroll pane")),
                new JSeparator(),
                newJSlider(),
                new JSpinner(new SpinnerListModel(new String[] { "A spiner", "is what", "this is" })),
                new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, new JLabel("A split pane"),
                        new JLabel("A split pane")),
                newJTabbedPane(),
                new JTable(new String[][] { new String[] { "A", "table" }, new String[] { "is", "what" },
                        new String[] { "this", "is" } }, new String[] { "A", "B" }),
                new JTextArea("A text area"),
                new JTextField("A text field"),
                new JToggleButton("A toggle button"),
                new JTree(newTreeModelRoot()),

                new JXBusyLabel(),
                new JXButton("A button"),
                new JXColorSelectionButton(),
                new JXComboBox(new String[] { "A combo box", "is what", "this is" }),
                new JXDatePicker(Calendar.getInstance().getTime()),
                new JXEditorPane("text/html", "<html>An <b>editor pane</b></html>"),
                new JXErrorPane(),
                new JXFindBar(),
                new JXFindPanel(),
                new JXFormattedTextField("A formatted text field"),
                new JXGradientChooser(),
                new JXGraph(),
                new JXHeader("A header", "is what this is"),
                new JXHyperlink(new AbstractActionExt("An hyperlink") { private static final long serialVersionUID = 1L;
                        @Override public void actionPerformed(ActionEvent e) { /* */ }}),
                newJXImageView(),
                new JXLabel("A label"),
                new JXList(new String[] { "A list", "is what", "this is" }),
                new JXLoginPane(),
                new JXMonthView(),
                newJXMultiSplitPane(),
                new JXMultiThumbSlider<Object>(),
                new JXPanel(),
                new JXSearchField("A search field"),
                new JXSearchPanel(),
                new JXRadioGroup<String>(new String[] { "A", "radio", "group" }),
                new JXTaskPane("A task pane"),
                newJXTaskPaneContainer(),
                new JXTable(new String[][] { new String[] { "A", "table" }, new String[] { "is", "what" },
                        new String[] { "this", "is" } }, new String[] { "A", "B" }),
                new JXTextArea("A text area"),
                new JXTextField("A text field"),
                new JXTipOfTheDay(newTipOfTheDayModel()),
                new JXTitledPanel("A titled panel"),
                new JXTitledSeparator("A titled separator"),
                new JXTree(newTreeModelRoot()),
                new JXTreeTable(newTreeTableModel()),
        });
        componentsCombo.setRenderer(new DefaultListCellRenderer() {
            private static final long serialVersionUID = 1L;
            @Override
            public Component getListCellRendererComponent(JList list, Object value, int index, boolean selected,
                    boolean focused) {
                DefaultListCellRenderer component = (DefaultListCellRenderer) super.getListCellRendererComponent(list,
                        value, index, selected, focused);
                component.setText(value.getClass().getSimpleName());

                return component;
            }});
        componentsCombo.addItemListener(new ItemListener() {
            @Override
            public void itemStateChanged(ItemEvent event) {
                collapsiblePane.setCollapsed(true);
                collapsiblePane.setContentPane((JComponent) event.getItem());
                collapsiblePane.setCollapsed(false);
            }});

        collapsiblePane.setContentPane((JComponent) componentsCombo.getItemAt(0));

        Action reproduceExceptionAction = new AbstractActionExt("<html>Reproduce exception:<br /><ol>" +
                "<li>Set an AbstractButton as content</li>" +
        		"<li>Set Nimbus look and feel</li>" +
        		"<li>Toggle</li></ol></html>") {
            private static final long serialVersionUID = 1L;
            @Override
            @SuppressWarnings("unchecked")
            public void actionPerformed(ActionEvent event) {
                LookAndFeel nimbus = null;
                for (UIManager.LookAndFeelInfo lafInfo : UIManager.getInstalledLookAndFeels()) {
                    if (lafInfo.getName() == "Nimbus") {
                        try {
                            nimbus = ((Class<LookAndFeel>) Class.forName(lafInfo.getClassName())).newInstance();
                        } catch (Exception e) {
                            JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(
                                    CollapsiblePaneContentTest.this), "This shouldn't be happening.",
                                    "Unexpected error", JOptionPane.ERROR_MESSAGE);
                            e.printStackTrace();
                        }
                    }
                }

                if (nimbus != null) {
                    int i = 0;
                    AbstractButton button = null;
                    while ((i < componentsCombo.getItemCount()) && (button == null)) {
                        Object item = componentsCombo.getItemAt(i);
                        if (item instanceof AbstractButton) {
                            button = (AbstractButton) item;
                        }
                        i++;
                    }
                    if (button != null) {
                        componentsCombo.setSelectedItem(button);

                        try {
                            UIManager.setLookAndFeel(nimbus);
                        } catch (UnsupportedLookAndFeelException e) {
                            JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(
                                    CollapsiblePaneContentTest.this), "This shouldn't be happening.",
                                    "Unexpected error", JOptionPane.ERROR_MESSAGE);
                            e.printStackTrace();
                        }
                        SwingUtilities.updateComponentTreeUI(SwingUtilities.getWindowAncestor(
                                CollapsiblePaneContentTest.this));

                        collapsiblePane.setCollapsed(false);
                        collapsiblePane.setCollapsed(true);
                    } else {
                        JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(CollapsiblePaneContentTest.this),
                                "There is no " + AbstractButton.class.getSimpleName() + " in the combo, you can't"
                                + " reproduce this exception properly.", "Content error", JOptionPane.ERROR_MESSAGE);
                        setEnabled(false);
                    }
                } else {
                    JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(CollapsiblePaneContentTest.this),
                            "Your system does not support Nimbus, you can't reproduce this exception properly.",
                            "Look and Feel error", JOptionPane.ERROR_MESSAGE);
                    setEnabled(false);
                }
            }};

        add(new JXButton(reproduceExceptionAction));
        add(componentsCombo);
        add(collapsiblePane);
        add(new JXButton(collapsiblePane.getActionMap().get(JXCollapsiblePane.TOGGLE_ACTION)));
    }

    protected static Action createChangeLookAndFeelAction(final JFrame frame, final UIManager.LookAndFeelInfo lookAndFeelInfo) {
        return new AbstractActionExt(lookAndFeelInfo.getName()) {
            private static final long serialVersionUID = 1L;
            @Override
            public void actionPerformed(ActionEvent event) {
                try {
                    UIManager.setLookAndFeel(lookAndFeelInfo.getClassName());
                    SwingUtilities.updateComponentTreeUI(frame);
                } catch (Exception e) {
                    JOptionPane.showMessageDialog(frame, "There was a problem setting the look and feel "
                            + lookAndFeelInfo.getName() + ".", "Look and Feel error", JOptionPane.ERROR_MESSAGE);
                    e.printStackTrace();
                }
            }};
    }

    protected static JDesktopPane newJDesktopPane() {
        JDesktopPane desktopPane = new JDesktopPane();
        desktopPane.setPreferredSize(new Dimension(800, 400));

        JInternalFrame internalFrame = new JInternalFrame("An internal frame");
        internalFrame.setSize(new Dimension(150, 50));
        internalFrame.getContentPane().add(new JLabel("inside a desktop pane"));
        internalFrame.setVisible(true);
        desktopPane.add(internalFrame);

        return desktopPane;
    }

    protected static JSlider newJSlider() {
        JSlider slider = new JSlider(0, 7);
        Hashtable<Integer, JComponent> labelTable = new Hashtable<Integer, JComponent>();
        labelTable.put(Integer.valueOf(0), new JXLabel("A"));
        labelTable.put(Integer.valueOf(1), new JXLabel(" "));
        labelTable.put(Integer.valueOf(2), new JXLabel("S"));
        labelTable.put(Integer.valueOf(3), new JXLabel("l"));
        labelTable.put(Integer.valueOf(4), new JXLabel("i"));
        labelTable.put(Integer.valueOf(5), new JXLabel("d"));
        labelTable.put(Integer.valueOf(6), new JXLabel("e"));
        labelTable.put(Integer.valueOf(7), new JXLabel("r"));
        slider.setLabelTable(labelTable);
        slider.setPaintLabels(true);
        slider.setPaintTicks(true);
        slider.setSnapToTicks(true);
        slider.getModel();

        return slider;
    }

    protected static JTabbedPane newJTabbedPane() {
        JTabbedPane tabbedPane = new JTabbedPane();
        tabbedPane.addTab("A", new JXLabel("A tabbed pane"));
        tabbedPane.addTab("tabbed", new JXLabel("A tabbed pane"));
        tabbedPane.addTab("pane", new JXLabel("A tabbed pane"));

        return tabbedPane;
    }

    protected static JXImageView newJXImageView() {
        JXImageView imageView = new JXImageView();
        try {
            imageView.setImage(new URL("http://duke.kenai.com/wave/Wave.jpg"));
            Image image = imageView.getImage();
            if (image != null) {
                imageView.setPreferredSize(new Dimension(image.getWidth(imageView), image.getHeight(imageView)));
            }
        } catch (Exception e) {
            // Ignored
        }

        return imageView;
    }

    protected static JXMultiSplitPane newJXMultiSplitPane() {
        JXMultiSplitPane multiSplitPane = new JXMultiSplitPane(new MultiSplitLayout(MultiSplitLayout.parseModel(
                "(COLUMN (ROW (LEAF name=NW weight=0.5) (LEAF name=NE weight=0.5))"
                + " (ROW (LEAF name=SW weight=0.5) (LEAF name=SE weight=0.5)))")));
        multiSplitPane.add(new JXLabel("A"), "NW");
        multiSplitPane.add(new JXLabel("multi"), "NE");
        multiSplitPane.add(new JXLabel("split"), "SW");
        multiSplitPane.add(new JXLabel("pane"), "SE");

        return multiSplitPane;
    }

    protected static JXTaskPaneContainer newJXTaskPaneContainer() {
        JXTaskPaneContainer taskPaneContainer = new JXTaskPaneContainer();
        taskPaneContainer.add(new JXTaskPane("A"));
        taskPaneContainer.add(new JXTaskPane("task"));
        taskPaneContainer.add(new JXTaskPane("pane"));
        taskPaneContainer.add(new JXTaskPane("container"));

        return taskPaneContainer;
    }

    protected static TipOfTheDayModel newTipOfTheDayModel() {
        return new DefaultTipOfTheDayModel(new TipOfTheDayModel.Tip[] { new TipOfTheDayModel.Tip() {
            @Override
            public String getTipName() {
                return "Tip of the Day";
            }
            @Override
            public Object getTip() {
                return "This is a Tip of the Day.";
            }} });
    }

    protected static DefaultMutableTreeNode newTreeModelRoot() {
        DefaultMutableTreeNode root = new DefaultMutableTreeNode("A tree");
        DefaultMutableTreeNode isNode = new DefaultMutableTreeNode("is");
        DefaultMutableTreeNode whatNode = new DefaultMutableTreeNode("what");
        DefaultMutableTreeNode thisNode = new DefaultMutableTreeNode("this");
        DefaultMutableTreeNode is2Node = new DefaultMutableTreeNode("is");
        root.add(isNode);
        isNode.add(whatNode);
        root.add(thisNode);
        thisNode.add(is2Node);

        return root;
    }

    protected static TreeTableModel newTreeTableModel() {
        DefaultMutableTreeTableNode root = createDefaultMutableTreeTableNode(null);
        DefaultMutableTreeTableNode aTreeNode = createDefaultMutableTreeTableNode("A tree table");
        DefaultMutableTreeTableNode isNode = createDefaultMutableTreeTableNode("is");
        DefaultMutableTreeTableNode whatNode = createDefaultMutableTreeTableNode("what");
        DefaultMutableTreeTableNode thisNode = createDefaultMutableTreeTableNode("this");
        DefaultMutableTreeTableNode is2Node = createDefaultMutableTreeTableNode("is");
        root.add(aTreeNode);
        aTreeNode.add(isNode);
        isNode.add(whatNode);
        aTreeNode.add(thisNode);
        thisNode.add(is2Node);

        return new DefaultTreeTableModel(root, Arrays.asList("Hierarchical", "Plain"));
    }

    private static DefaultMutableTreeTableNode createDefaultMutableTreeTableNode(Object userObject) {
        return new DefaultMutableTreeTableNode(userObject) {
            @Override
            public int getColumnCount() {
                return 2;
            }};
    }

    public static void main(String... args) {
        JFrame.setDefaultLookAndFeelDecorated(false);
        JDialog.setDefaultLookAndFeelDecorated(false);

        try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        } catch (Exception e) {
            e.printStackTrace();
        }

        CollapsiblePaneContentTest collapsiblePaneOpacityTest = new CollapsiblePaneContentTest();

        final JXFrame frame = new JXFrame(CollapsiblePaneContentTest.class.getSimpleName());
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setStartPosition(JXFrame.StartPosition.CenterInScreen);
        frame.setPreferredSize(new Dimension(800, 600));
        frame.setContentPane(collapsiblePaneOpacityTest);

        Action closeFrameAction = new AbstractActionExt("Exit") {
            private static final long serialVersionUID = 1L;
            @Override
            public void actionPerformed(ActionEvent event) {
                frame.dispose();
            }};

        JMenuBar menuBar = new JMenuBar();
        JMenu fileMenu = new JMenu("File");
        fileMenu.add(new JMenuItem(closeFrameAction));
        menuBar.add(fileMenu);
        JMenu lookAndFeelMenu = new JMenu("Look&Feel");
        for (UIManager.LookAndFeelInfo lookAndFeelInfo : UIManager.getInstalledLookAndFeels()) {
            lookAndFeelMenu.add(new JMenuItem(createChangeLookAndFeelAction(frame, lookAndFeelInfo)));
        }
        menuBar.add(lookAndFeelMenu);
        frame.setJMenuBar(menuBar);

        JXStatusBar statusBar = new JXStatusBar();
        final JXLabel lookAndFeelLabel = new JXLabel(UIManager.getLookAndFeel().getName());
        statusBar.add(lookAndFeelLabel);
        statusBar.add(lookAndFeelLabel);
        UIManager.addPropertyChangeListener(new PropertyChangeListener() {
            @Override
            public void propertyChange(PropertyChangeEvent event) {
                if (event.getPropertyName() == "lookAndFeel") {
                    lookAndFeelLabel.setText(((LookAndFeel) event.getNewValue()).getName());
                }
            }});
        frame.setStatusBar(statusBar);

        frame.pack();
        frame.setVisible(true);
    }

}




[SWINGX-1533] JXLoginPane contains spelling errors for Spanish messages Created: 16/Nov/12  Updated: 10/Dec/12  Resolved: 10/Dec/12

Status: Resolved
Project: swingx
Component/s: Authentication
Affects Version/s: 0.9.0, 0.9.1, 0.9.2, 0.9.3, 0.9.4, 0.9.5, 0.9.6, 0.9.7, 1.0, 1.6, 1.6.1, 1.6.2, 1.6.3, 1.6.4
Fix Version/s: 1.6.5

Type: Bug Priority: Minor
Reporter: dsmania Assignee: Unassigned
Resolution: Fixed Votes: 0
Remaining Estimate: 5 minutes
Time Spent: Not Specified
Original Estimate: 5 minutes
Environment:

Java SE 7 running on Windows 7


Issue Links:
Dependency
blocks SWINGX-518 Extend language support to other lang... Open
Tags: jxloginpane login
Participants: dsmania and kleopatra

 Description   

The Spanish messages for JXLoginPane contain spelling errors:

  • To make it more consistent, although in Spanish "contraseña" (password) and "clave" (key) are synonims, only one word would be used accross all the messages. The most propet in my opinión would be "contraseña", thus the message when an error occurrs would be "... Compruebe su nombre de usuario y contraseña. ...".


 Comments   
Comment by dsmania [ 16/Nov/12 06:13 AM ]

Credit to Lola Traba Martínez for reporting this issue, just writting on behalf of her.

Comment by kleopatra [ 06/Dec/12 04:01 PM ]

good catch (definitely the first and third bullet, and most probably for the second as well, which I can't judge - my Spanish is a bit rusty

For localization issue, we have a always open issue SWINGX-518 - would you please contribute a patch for LoginPane_es.properties in that issue? If you do, this can make it into the 1.6.5 release which is planned for the near future.

Thanks
Jeanette

Comment by kleopatra [ 06/Dec/12 04:03 PM ]

spanish loginpane properties should be updated

Comment by kleopatra [ 10/Dec/12 11:04 AM ]

resolved by committing the corrected properties contributed to swingx-518





[SWINGX-1519] Suffix -Ext should be used more consistently Created: 09/Aug/12  Updated: 22/Aug/12

Status: Open
Project: swingx
Component/s: None
Affects Version/s: 1.6.4
Fix Version/s: None

Type: Improvement Priority: Trivial
Reporter: dsmania Assignee: Unassigned
Resolution: Unresolved Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: dsmania and kleopatra

 Description   

There are several classes and interfaces with the suffix -Ext:

  • AbstractActionExt
  • DefaultTableColumnModelExt
  • MatteBorderExt
  • NumberFormatExt
  • TableColumnExt
  • TableColumnModelExt

and

  • UIManagerExt (extends Object)
  • NumberEditorExt (extends DefaultCellEditor)

While in the first group, the classes extend from the class we could expect (those with names without the Ext), in the second group this does not happen so.
In the case of UIManager and UIManagerExt, they both share some methods while other are exclusive to each and its use might be confusing.
When talking about NumberEditor and NumberEditorExt, it's impossible to extend the first class as is internal to JTable and has package visibility. Even though the name is inaccurate as it doesn't extend the first class, but in this case the class would rarely be worked.

Even if "Ext" doesn't properly stand for "Extended" (in a lazier meaning other than that the class extends from the superclass) and would make some sense, this naming policy drives to mistakes and in my opinion might be improved.

Possible solutions:
While I'm not sure if accurate (as I didn't follow the development), I'd not like to report without giving any idea:

  • In the case of UIManager, as all the methods are static, a possibility would be adding all the methods in UIManager to the new class, delegating them into UIManager and changing its name to "UIManagerX", "UIManager2", "XUIManager" or any other.
  • In the case of NumberEditor I'd opt for moving it into TableNumberEditor as, although the package already states that it's for a table, there is another NumberEditor for JSpinner.


 Comments   
Comment by kleopatra [ 22/Aug/12 01:07 PM ]

(sorry, didn't see this earlier)

good observations

Nevertheless, tend to do nothing about it: as name changes always break backward compatibility that breakage should be weighted against the naming scheme purity.

Cheers
Jeanette





[SWINGX-1449] JXButton doesn't update font if background is modified Created: 16/May/11  Updated: 03/Aug/12  Resolved: 03/Aug/12

Status: Resolved
Project: swingx
Component/s: Misc Component
Affects Version/s: 1.6.2, 1.6.3, 1.6.4
Fix Version/s: 1.6.5

Type: Bug Priority: Minor
Reporter: dsmania Assignee: Karl Schaefer
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Java SE 6 SDK 1.6.0u25
Windows 7 (64 bit)
Latest SwingX build


Tags: JXButton button background painter font
Participants: dsmania and Karl Schaefer

 Description   

If you set font on a button and later you modify either background color or painter, the font is restored back to normal. Not only that, if you notice, when you set background painter the font is drawn slightly bolder.

The following code illustrates the case comparing JButton and JXButton behaviors:

import java.awt.Color;
import java.awt.Container;
import java.awt.Font;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.SwingConstants;
import org.jdesktop.swingx.HorizontalLayout;
import org.jdesktop.swingx.JXButton;
import org.jdesktop.swingx.JXLabel;
import org.jdesktop.swingx.JXPanel;
import org.jdesktop.swingx.VerticalLayout;
import org.jdesktop.swingx.painter.MattePainter;
import org.jdesktop.swingx.painter.Painter;

public class JXButtonFontAndBackgroundTest {

public static void main(String... args) { JFrame.setDefaultLookAndFeelDecorated(true); JFrame frame = new JFrame("JXButton .setFont(), .setBackground() and .setBackgroundPainter() test"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Font font = Font.decode("Arial-BOLDITALIC-14"); Color background = Color.LIGHT_GRAY; Painter<?> backgroundPainter = new MattePainter(background); JButton button1 = new JButton("Default"); JButton button2 = new JButton("Font changed"); button2.setFont(font); JButton button3 = new JButton("Background changed"); button3.setBackground(background); JButton button4 = new JButton("Background changed"); button4.setBackground(background); // button4.setBackgroundPainter(backgroundPainter); JButton button5 = new JButton("Font and Background changed"); button5.setFont(font); button5.setBackground(background); JButton button6 = new JButton("Font and Background changed"); button6.setFont(font); button6.setBackground(background); // button6.setBackgroundPainter(backgroundPainter); JXButton xbutton1 = new JXButton("Default"); JXButton xbutton2 = new JXButton("Font changed"); xbutton2.setFont(font); JXButton xbutton3 = new JXButton("Background changed"); xbutton3.setBackground(background); JXButton xbutton4 = new JXButton("BackgroundPainter changed"); xbutton4.setBackgroundPainter(backgroundPainter); JXButton xbutton5 = new JXButton("Font and Background changed"); xbutton5.setFont(font); xbutton5.setBackground(background); JXButton xbutton6 = new JXButton("Font and BackgroundPainter changed"); xbutton6.setFont(font); xbutton6.setBackgroundPainter(backgroundPainter); JXPanel panel = new JXPanel(new VerticalLayout()); panel.add(new JXLabel(JButton.class.getSimpleName(), SwingConstants.CENTER)); panel.add(button1); panel.add(button2); panel.add(button3); panel.add(button4); panel.add(button5); panel.add(button6); JXPanel xpanel = new JXPanel(new VerticalLayout()); xpanel.add(new JXLabel(JXButton.class.getSimpleName(), SwingConstants.CENTER)); xpanel.setLayout(new VerticalLayout()); xpanel.add(xbutton1); xpanel.add(xbutton2); xpanel.add(xbutton3); xpanel.add(xbutton4); xpanel.add(xbutton5); xpanel.add(xbutton6); Container contentPane = frame.getContentPane(); contentPane.setLayout(new HorizontalLayout()); contentPane.add(panel); contentPane.add(xpanel); frame.pack(); frame.setLocationRelativeTo(null); frame.setVisible(true); }

}



 Comments   
Comment by Karl Schaefer [ 03/Aug/12 06:28 PM ]

SWINGX-1449: Ensure that the foreground rendering button has the same font as the JXButton.

swingx/swingx-core/src/test/java/org/jdesktop/swingx/JXButtonTest.java
swingx/swingx-core/src/main/java/org/jdesktop/swingx/JXButton.java
swingx/swingx-core/src/test/java/org/jdesktop/swingx/JXButtonVisualCheck.java

Committed revision 4217.





[SWINGX-1435] JXTitledPane, JXCollapsiblePane and JXTaskPane opacity issues Created: 08/Apr/11  Updated: 14/Nov/12  Resolved: 14/Nov/12

Status: Resolved
Project: swingx
Component/s: Misc Component, TaskPane and CollapsiblePane
Affects Version/s: 1.6.2
Fix Version/s: 1.6.5

Type: Improvement Priority: Minor
Reporter: dsmania Assignee: Karl Schaefer
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Java SE 6u24


Tags: JXTitledPane JXCollapsiblePane JXTaskPane opaque
Participants: dsmania and Karl Schaefer

 Description   

These 3 components have a content pane that holds the content to be shown. The opacity of the content pane should be treated independently and this is working as intended.

  • JXTitledPane
    This component is non opaque by default as well as its content pane. This seems not to make much sense in comparison with most of the components.
  • JXCollapsiblePane
    Works fine
  • JXTaskPane
    This component is opaque by default. In this component as it has rounded corners (although it would depend on the LaF) in the top would make sense it was translucent.
    The wrapper is opaque and we need to use a workaround to make it translucent. The same happened to JXTitledPane and was fixed.

I'm writting this issues altogether to make a comparison, would break it up in different issues if needed.

Example code:

import java.awt.Color;
import java.awt.Component;
import java.awt.Container;

import javax.swing.Box;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JSeparator;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import javax.swing.border.EmptyBorder;

import org.jdesktop.swingx.JXButton;
import org.jdesktop.swingx.JXCollapsiblePane;
import org.jdesktop.swingx.JXFrame;
import org.jdesktop.swingx.JXFrame.StartPosition;
import org.jdesktop.swingx.JXLabel;
import org.jdesktop.swingx.JXPanel;
import org.jdesktop.swingx.JXTaskPane;
import org.jdesktop.swingx.JXTextField;
import org.jdesktop.swingx.JXTitledPanel;
import org.jdesktop.swingx.VerticalLayout;
import org.jdesktop.swingx.painter.CompoundPainter;
import org.jdesktop.swingx.painter.GlossPainter;
import org.jdesktop.swingx.painter.MattePainter;

public class PanelsOpacityTest {

protected static Color DARK_BLUE = new Color(99, 130, 191);
protected static Color LIGHT_BLUE = new Color(184, 207, 229);

public static void main(String... args ) {
JFrame.setDefaultLookAndFeelDecorated(true);

SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
JXFrame frame = new JXFrame("Opacity test for JXCollapsiblePane and JXTitlePanel");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setStartPosition(StartPosition.CenterInScreen);

JXPanel contentPane = new JXPanel(new VerticalLayout());
contentPane.setBackgroundPainter(new CompoundPainter<JXPanel>(new MattePainter(DARK_BLUE), new GlossPainter(LIGHT_BLUE)));
frame.setContentPane(contentPane);

JXTitledPanel titledPanel = new JXTitledPanel("JXTitledPanel");
System.out.println("JXTitledPanel default opacity = " + titledPanel.isOpaque());
addSomeTranslucentContentTo(titledPanel.getContentContainer());
// titledPanel.setOpaque(false); // It's translucent by default. Is this correct?
// ((JComponent) titledPanel.getComponent(0)).setOpaque(false); // For making the wrapper translucent. Fixed. Not needed any more as of 1.6.3
// ((JComponent) titledPanel.getContentContainer()).setOpaque(true); // For making the content pane translucent. Working as intended

JXCollapsiblePane collapsiblePane = new JXCollapsiblePane();
System.out.println("JXCollapsiblePane default opacity = " + collapsiblePane.isOpaque());
addSomeTranslucentContentTo(collapsiblePane.getContentPane());
collapsiblePane.setOpaque(false);
((JComponent) collapsiblePane.getContentPane()).setOpaque(false);

JXTaskPane taskPane = new JXTaskPane("JXTaskPane");
System.out.println("JXTaskPane default opacity = " + taskPane.isOpaque());
addSomeTranslucentContentTo(taskPane.getContentPane());
taskPane.setOpaque(false); // It's opaque by default. While this makes sense notice the top corners: this should be transparent (check setting to true)
((JComponent) taskPane.getComponent(0)).setOpaque(false); // For making the wrapper translucent. This shouldn't be needed
((JComponent) taskPane.getContentPane()).setOpaque(false); // For making the content pane translucent. Correct

contentPane.add(createOpacitityTestPanelFor(titledPanel));
contentPane.add(new JSeparator(SwingConstants.HORIZONTAL));
contentPane.add(createOpacitityTestPanelFor(createControlPanelFor(collapsiblePane), collapsiblePane));
contentPane.add(new JSeparator(SwingConstants.HORIZONTAL));
contentPane.add(createOpacitityTestPanelFor(taskPane));

frame.pack();
frame.setVisible(true);
}});
}

protected static JXPanel createOpacitityTestPanelFor(Component... components) {
JXPanel testPanel = new JXPanel(new VerticalLayout());
testPanel.setOpaque(false);
testPanel.setBorder(new EmptyBorder(10, 10, 10, 10));

for (Component component : components) { testPanel.add(component); }

return testPanel;
}

protected static JXPanel createControlPanelFor(JXCollapsiblePane collapsiblePane) { JXPanel collapsiblePaneControlPanel = new JXPanel(); collapsiblePaneControlPanel.setOpaque(false); collapsiblePaneControlPanel.add(new JXLabel("JXCollapsiblePane")); collapsiblePaneControlPanel.add(Box.createHorizontalBox()); collapsiblePaneControlPanel.add(new JXButton(collapsiblePane.getActionMap().get(JXCollapsiblePane.TOGGLE_ACTION))); return collapsiblePaneControlPanel; }

protected static void addSomeTranslucentContentTo(Container container) { container.setLayout(new VerticalLayout()); JXLabel label = new JXLabel("Some content"); label.setOpaque(false); container.add(label); JXTextField textField = new JXTextField("Write something (if you want to)"); textField.setOpaque(false); container.add(textField); JXButton button = new JXButton("Does nothing"); button.setOpaque(false); button.setBackgroundPainter(new MattePainter(new Color(0, 0, 0, 0))); container.add(button); }

}



 Comments   
Comment by Karl Schaefer [ 14/Nov/12 08:59 PM ]

SWINGX-1435: Fix opacity issues with JXTitledPanel, making it's content pane opaque by default. Fix opacity issues with JXTaskPane, making it and it's internal collaspible pane non-opaque by default, while it's content pane continues to be opaque by default.

swingx-core/src/main/java/org/jdesktop/swingx/plaf/basic/BasicTaskPaneUI.java
swingx-core/src/main/java/org/jdesktop/swingx/JXTitledPanel.java
swingx-core/src/main/java/org/jdesktop/swingx/JXTaskPane.java

Committed revision 4260.





[SWINGX-1433] JXSearchPanel doesn't have its combo box localized Created: 06/Apr/11  Updated: 06/Apr/11  Resolved: 06/Apr/11

Status: Resolved
Project: swingx
Component/s: Search
Affects Version/s: 1.6.2
Fix Version/s: 1.6.3

Type: Bug Priority: Major
Reporter: dsmania Assignee: kleopatra
Resolution: Fixed Votes: 0
Remaining Estimate: 0 minutes
Time Spent: Not Specified
Original Estimate: 0 minutes

Issue Links:
Dependency
depends on SWINGX-1434 LocalizableStringValue: support commo... Resolved
Tags: JXSearchPanel locale
Participants: dsmania and kleopatra

 Description   

The combo box in JXSearchPanel is always shown in english no matter which Locale set.



 Comments   
Comment by kleopatra [ 06/Apr/11 09:44 AM ]
  • changed combo to JXComboBox
  • set combo's renderer to use a LocalizableStringValue
  • added update of stringValue on setLocale
  • added tests

committed as of revision #3995





[SWINGX-1432] JXFindBar and JXSearchPanel don't properly update labels to English when created on Spanish locale Created: 06/Apr/11  Updated: 07/Apr/11  Resolved: 07/Apr/11

Status: Resolved
Project: swingx
Component/s: Search
Affects Version/s: 1.6.2
Fix Version/s: 1.6.3

Type: Bug Priority: Minor
Reporter: dsmania Assignee: kleopatra
Resolution: Fixed Votes: 0
Remaining Estimate: 0 minutes
Time Spent: Not Specified
Original Estimate: 0 minutes
Environment:

Java SE 6u23


Tags: JXFindBar JXSearchPanel AbstractPatternPanel Locale
Participants: dsmania and kleopatra

 Description   

JXFindBar and JXSearchPanel, both extending AbstractPatternPanel, fail to update their labels and other texts when changing locale to English if the locale they were created with was Spanish, but it doesn't fail if it was French or English.

Notice that Spanish is not on the Locale standard definitions (Locale.XXXX) and has to be instanced as new Locale("es"), or "es_ES" for Spanish from Spain.

Additionally the combo in JXSearchPanel is never localized.

Example code:

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Locale;
import java.util.Vector;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
import org.jdesktop.swingx.JXFindBar;
import org.jdesktop.swingx.JXFrame;
import org.jdesktop.swingx.JXFrame.StartPosition;
import org.jdesktop.swingx.JXPanel;
import org.jdesktop.swingx.JXSearchPanel;
import org.jdesktop.swingx.VerticalLayout;

public class JXFindBarLocaleTest {

public static final Locale EN_LOCALE = Locale.ENGLISH;
public static final Locale ES_LOCALE = new Locale("es");
public static final Locale FR_LOCALE = Locale.FRENCH;

public static void main(String... args) {
/* Uncomment one to choose */
// Locale.setDefault(EN_LOCALE);
Locale.setDefault(ES_LOCALE);
// Locale.setDefault(FR_LOCALE);

SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
JFrame.setDefaultLookAndFeelDecorated(true);

JXFrame frame = new JXFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setStartPosition(StartPosition.CenterInScreen);

final JXFindBar findBar = new JXFindBar();
final JXSearchPanel searchPanel = new JXSearchPanel();

Vector<Locale> locales = new Vector<Locale>();
locales.add(EN_LOCALE);
locales.add(ES_LOCALE);
locales.add(FR_LOCALE);
final JComboBox localeCombo = new JComboBox(locales);
localeCombo.setSelectedItem(Locale.getDefault());
localeCombo.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
Locale locale = (Locale) localeCombo.getSelectedItem();
findBar.setLocale(locale);
searchPanel.setLocale(locale);
}});

JXPanel contentPane = new JXPanel(new VerticalLayout());
contentPane.add(findBar);
contentPane.add(searchPanel);
contentPane.add(localeCombo);
frame.setContentPane(contentPane);

frame.pack();
frame.setVisible(true);
}});
}

}



 Comments   
Comment by kleopatra [ 06/Apr/11 07:07 AM ]

two issues, I think:

a) the not-updating to English if default is ES

worksforme - which might be the same/similar as a recently fixed issue (cant find its number right now, though) of missing properties files for _en. Could you please check with a current build of SwingX?

b) missing localization of the matchRule: guilty as pledged
Would you please open a separate ticket for that?

Thanks
Jeanette

Comment by kleopatra [ 06/Apr/11 07:27 AM ]

found it: the maybe-related issue for part 1 is SWINGX-1394

Comment by dsmania [ 07/Apr/11 04:43 AM ]

Right it was working on the latest build, I was using 1.6.2. My bad.

Comment by kleopatra [ 07/Apr/11 07:41 AM ]

glad there's not yet another issue

Thanks!
Jeanette





[SWINGX-1409] Non-unique uiClassID in JXmonthView and other classes Created: 30/Jan/09  Updated: 02/Sep/13

Status: Open
Project: swingx
Component/s: Plaf
Affects Version/s: 1.6.2
Fix Version/s: 1.6.6

Type: Bug Priority: Major
Reporter: halkmund Assignee: Karl Schaefer
Resolution: Unresolved Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 63
Tags:
Participants: dsmania, halkmund, Karl Schaefer and kleopatra

 Description   

Hi,

we are developing ui components for integration with several hospital
scheduling systems (worldwide) and we have discovered an issue when using
JXMonthView and JXDatePicker.

E.g.: JXMonthView: the uiClassID is "MonthViewUI". This happens to be the same
uiClassID as the JMonthView of StandbySoft. Both use the same uiClassID, but
provide and expect different ComponentUI subclasses. When both components are
used in the same application, ClassCastExceptions are thrown (either by SwingX
or StandbySoft depending on who won the UI-class registration).

I guess it would be wise to use a more restrictive identifier to allow the
UIManager to distinguish between the possibly different MonthViewUIs.

For us this is a major issue and as long as it is not resolved we cannot use
the SwingX components although we think they are really great.

Kind regards.



 Comments   
Comment by kleopatra [ 30/Jan/09 07:11 AM ]

please file technical issues in the subproject's issue tracker, in this case
that would be the swingx issue tracker.

As the the issue - we could easily reverse the perspective: it's the fault of
the other framework <g> Which would anyway as well at the very moment when core
Swing would add a JMonthView.

Actually, don't think we could do much about it - when it comes to a particular
component, application devs have to choose which to use. Either a the JMonthView
of the one or the JXMonthView of the other. Mixing isn't really supported.

Cheers
Jeanette

Comment by kleopatra [ 30/Jan/09 07:15 AM ]

> Which would anyway as well at the very moment when core

missing a "break" after the would ..

Comment by halkmund [ 30/Jan/09 07:31 AM ]

Ok, thanks for your swift reply.

At least the issue is out in the open now.
I guess we will have to roll our own...

Kind regards.

Comment by kleopatra [ 30/Jan/09 07:42 AM ]

you are welcome

But not necessarily roll-your-own - why exactly do you use a JMonthView in one
part of the application and a JXMonthView in another? (might give us a hint as
to what is missing in ours)

Thanks
Jeanette

Comment by halkmund [ 30/Jan/09 09:32 AM ]

Our components are used in existing production environments on customer sites worldwide of which
some use SwingX, others use StandbySoft.

We have looked into the subject, to no avail. The problem sits in a static code block and we cannot
avoid it being executed.

I agree mixing isn't ideal, but in our case we kind of have no choice.

Btw, there's nothing missing, on the contrary: we want to use JXMonthView because JMonthView
(StandbySoft) is missing features JXMonthView has

I understand your point of view and will contact StandbySoft about this too. We have lost several days
due to this issue; I believe the most important thing is that it is uncovered now and available on the net
for other users.

PS: We already have decided to invest in our own set of date components as a workaround.
(Deadlines...)

Thanks,
Peter

Comment by Karl Schaefer [ 31/Mar/11 08:24 AM ]

We can always make our UI class IDs a little less likely to collide. We are prefixing with "swingx/" in the ID for JXCollapsiblePane (or JXTaskPane can't remember which). It's just a key used for a lookup, so their's no reason to not prefix our IDs. We have never published our IDs value, since any custom class contains a static constant for the ID. If anyone introspected that and attempted to use the ID without refering to the constant, they've done a no-no, so if we break compatibility for them, I'm not too concerned. We should be able to change the IDs at our leisure.

Any objections to adding a "swingx/" prefix?

Karl

Comment by kleopatra [ 31/Mar/11 08:52 AM ]

such a prefix violates the tentative naming conventions, weak though they are:

all subclasses of JComponent (and only these) should be prefixed with a "J":

JVeryExcitingView

the uiClassID is expected to strip the "J", actually that's the central part of the naming

VeryExcitingView

Its base uiDelegate adds a postfix "UI"

VeryExcitingViewUI

implementing LAF prefix their name

BasicVeryExcitingViewUI
SplendidVeryExcitingViewUI

sticking to conventions, allows educated guesses to get a particular concrete implementation given the class name of any of the participants is known. Specifically, it allows to fill the UIManager defaults table without actually loading the component classes itself (at least that's what I faintly remember from the very old days, don't know how important it still is)

That said: swingx doesn't stick to the rules anyway - mostly no "X" prefixed below the component class name, except when subclassing core components. That's the base reason for the name-clash reported in this issue.

Undecided - would suggest to open a thread in the forum (sigh ... ) and try to get some input, hopefully from LAF providers as well as from application devs

Cheers
Jeanette

Comment by Karl Schaefer [ 31/Mar/11 09:07 AM ]

It is only happenstance that the UI class ID and the defaults prefix are the same. We can easily change one without affecting the others. Then, we can ensure successful UI delegate look up (well, mostly successful, but who else should be prefixing with SwingX?), even if other values in the UIDefaults may collide.

It would mean that our code would always load correctly, even if it may not look correct because of bad UIDefaults values for everything else.

We also, already, have a disconnect in several class between UI class ID and UIDefaults prefix. So, when this is resolved, there is going to be some work to do either way: change IDs to use prefixes on IDs without them or remove prefixes from IDs that have them.

And I will try to start a discussion in the forum...if only I liked it as much as the new issue tracker.

Karl

Comment by kleopatra [ 31/Mar/11 09:41 AM ]

"It is only happenstance that the UI class ID and the defaults prefix are the same"

that's the point, I think it isn't It's not important for how we load it in the addons, but originally it was meant to be the identifying property. Look at BasicLookAndFeel et al installClassDefault:

"ButtonUI", basicPackageName + "BasicButtonUI",

they never made it to formalize that convention, and actually the id is kind-of assumed and Synth goes a completely different path as always.

Yeah, agreed, it'll be work one way or the other - we could opt to simply keep everything as-is: mixing frameworks rarely is a good idea. And don't see much of reason why it should be SwingX to go for the effort. But then, no hard opinions, just ramblings at the end of the day.

Have a nice day
Jeanette

edited: remove the duplicate quote which was nothing but confusing And removed the ranting <g>

Comment by dsmania [ 02/Sep/13 10:42 AM ]

While it's highly unlikely to happen, what if a component from SwingX gets promoted to Java 8 (I doubt it would happen, but from a design PoV makes sense) wouldn't the name clash happen then?

The prefix "X" for UI IDs makes sense to me, for either custom and extended components, the same way "JX" serves as prefix for the components, when they're extended or brand new.
JXWhatEver
XWhatEver
XWhatEverUI
BasicXWhatEverUI
SplendidXWhatEverUI

There's a slight "problem" and it's that the packages become crowded of classes starting with "X", that can be addressed by changing to a suffix instead.
JXWhatEver
WhatEverX
WhatEverXUI
BasicWhatEverXUI
SplendidWhatEverXUI

I'm working on some projects on which we use some custom components of our own following this one (we use an "S" instead) and worked fine for our developers. Also this is in the line of other classes extended from Java API such as AbstractActionExt or TableColumnExt.





[SWINGX-518] Extend language support to other languages Created: 23/May/07  Updated: 10/Dec/12

Status: Open
Project: swingx
Component/s: Plaf
Affects Version/s: 0.9.0
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: rah003 Assignee: Karl Schaefer
Resolution: Unresolved Votes: 1
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


File Attachments: Text File ErrorPane_es.properties     File ErrorPane_es_ES.properties     Text File JXDatePicker_pl_PL.properties     Text File LoginPane_de.properties     File LoginPane_es.properties     Text File LoginPane_es.properties     GZip Archive swingx-0.9.1-dutch.tar.gz     Zip Archive swingx_czech.zip     Text File swingx_da.properties     Zip Archive swingx_it_locale.zip     Text File swingx_nl.properties     Zip Archive swingx_polish.zip     Zip Archive swingx_pt_BR.zip     Zip Archive swingx_pt_BR.zip     Zip Archive swingx_se_sv.zip     Zip Archive swingx_se_sv.zip    
Issue Links:
Dependency
depends on SWINGX-944 JXFindPanel needs I18N - Value not found Resolved
depends on SWINGX-1533 JXLoginPane contains spelling errors ... Resolved
Issuezilla Id: 518
Tags:
Participants: dsmania, Karl Schaefer, kleopatra, mrmorris, nmwp, notte, p41elvis, rah003, serge_rehem, sialivi, ssamayoa, straps, v_vader and vity01

 Description   

org.jdesktop.swingx.plaf.resource.swingx.properties holds language specific
data. Support for other languages apart is needed. Currently only english,
german and spanish version exists. Please contribute more language mutations as
attachements to this issue.



 Comments   
Comment by vity01 [ 25/Aug/07 03:57 AM ]

Created an attachment (id=156)
czech locales

Comment by rah003 [ 28/Aug/07 12:22 AM ]

Excellent!

Comment by serge_rehem [ 22/Sep/07 11:23 PM ]

Created an attachment (id=165)
Brazilian Portuguese Locales

Comment by serge_rehem [ 22/Sep/07 11:23 PM ]

Created an attachment (id=166)
Brazilian Portuguese Locales

Comment by rah003 [ 27/Sep/07 12:35 PM ]

Committed. Thanks a lot for contribution.
BTW I've changed word possível to poss\u00edvel in the
auth/resources.properties. You might want to check that it is correct.

Comment by straps [ 11/Oct/07 10:52 AM ]

Created an attachment (id=169)
Italian translations

Comment by rah003 [ 17/Oct/07 08:59 AM ]

Applied with few changes suggested by Fabrizio after review. You might want to
look at final version. Thanks a lot for your contribution.

Comment by mrmorris [ 26/Oct/07 11:02 AM ]

Created an attachment (id=177)
Danish localization of SwingX

Comment by sialivi [ 31/Oct/07 12:08 PM ]

Created an attachment (id=178)
Swedish Locales

Comment by rah003 [ 01/Nov/07 07:10 AM ]

Hiya,

@mrmorris: Would you be also able to provide translation for the other resource
files? (org/jdesktop/swingx/auth/resources/resources.properties,
org/jdesktop/swingx/plaf/basic/resources/TipOfTheDay.properties,
org/jdesktop/swingx/plaf/windows/resources/TipOfTheDay.properties)

@sialivi: Could you check again
org/jdesktop/swingx/plaf/windows/resources/TipOfTheDay.properties in the zip u
have attached? It seems to have some not escaped national characters.
Anyway, thanks a lot for your contribution and sorry for my belated response

Comment by sialivi [ 03/Nov/07 10:05 AM ]

Created an attachment (id=179)
Swedish Locales (fixed missing unicode escapecode)

Comment by rah003 [ 04/Nov/07 08:22 AM ]

Committed. Thanks.

Comment by p41elvis [ 23/Nov/07 03:37 AM ]

Created an attachment (id=189)
A dutch translation of swingx 0.9.1.

Comment by rah003 [ 25/Nov/07 11:24 PM ]

Committed. Thanks a lot for contribution.

Comment by rah003 [ 26/Nov/07 07:25 AM ]

Setting milestone to post 1.0 as we can keep collecting new language mutations
forever.

Comment by notte [ 03/Jan/08 07:23 AM ]

Created an attachment (id=203)
German (_de) properties for JXLoginPane

Comment by kleopatra [ 08/Jan/08 07:00 AM ]

@notte,

(not sure if commentors are automatically notified, so just added you as CC,
just remove again if you get a duplicate)

thanks for the german login properties - never made it myself Looks okay,
just a couple of minor points

  • the values for cancelLogin and stopLogin might have been exchanged: "Login
    abbrechen" and "Login beenden" would be my expectation instead of the other way
    round
  • either way, stopLogin.mnemonic can't be "S"
  • don't know how strict we are with escaping Umlaute (personally, I never care,
    but I'm lazy <g>). Jan?

Cheers
Jeanette

Comment by kleopatra [ 17/Jan/08 02:42 AM ]
      • Issue 723 has been marked as a duplicate of this issue. ***
Comment by rah003 [ 11/Feb/08 08:30 PM ]

Umlauts should be escaped ... actually easiest way to ensure everything is
escaped properly (at least on unix) is to run
iconv -f iso88591 -t utf8 swingx_de_latin.properties | uni2ascii -qU >
swingx_de.properties

Comment by ssamayoa [ 14/Feb/08 09:07 AM ]

Created an attachment (id=228)
JXLoginPane spanish strings

Comment by ssamayoa [ 14/Feb/08 11:04 AM ]

Created an attachment (id=229)
JXErrorPanel spanish strings

Comment by rah003 [ 14/Feb/08 09:54 PM ]

Thanks for contribution. Applied on trunk as of build #879.

Comment by nmwp [ 24/Apr/08 03:25 AM ]

Created an attachment (id=242)
JXDatePicker polish strings

Comment by v_vader [ 08/Sep/08 07:05 AM ]

Created an attachment (id=253)
polish translation, not complete

Comment by p41elvis [ 15/Oct/08 02:16 AM ]

Created an attachment (id=257)
An updated version of the Dutch translation.

Comment by rah003 [ 16/Oct/08 02:14 PM ]

Applied polish translation. Thanks for contribution. Integrated in #1275
http://swinglabs.java.sun.com/hudson/job/SwingX%20Continuous%20Build/1275/

Comment by Karl Schaefer [ 31/Oct/08 12:18 PM ]

New internationalized string in swingx.properties.
Search.notFound=Value not found.

This string needs to be localized for all current localizations.

Comment by kleopatra [ 17/Dec/08 03:31 AM ]


added notFound value to German swingx properties

Comment by dsmania [ 10/Dec/12 08:36 AM ]

Added a fixed .properties for spanish translation of JXLoginPane. It includes the following changes related to the issue http://java.net/jira/browse/SWINGX-1533 :

JXLoginPane.capsOnWarning: misspell, "activiado" is written correctly "activado"
JXLoginPane.errorMessage: misspell, "fue" is to be written without acute accent in Spanish
JXLoginPane.failedString: changed "clave" into "contraseña" that, although synonyms, only one word should be used accross all the component
JXLoginPane.loggingInString: The ellipsis should not have a blank space after the last word
JXLoginPane.nameString: changed from "Nombre" to "Usuario" as is more descriptive and commonly used. "Nombre de usuario" would be the best translation but is too large for the component layout
JXLoginPane.rememberPasswordString: again changed "clave" to "contraseña" to make the component consistent
JXLoginPane.rememberUserString: there's a missing accute accent in the first "e"

Comment by dsmania [ 10/Dec/12 09:01 AM ]

Added a Spanish from Spain properties file including the following change:

According to Real Academia Española de la Lengua (RAE, Royal Spanish Accademy of Language) "reportar" has only the same meaning as the english "report" in american Spanish:
http://lema.rae.es/drae/?val=reportar
thus, in Spanish from Spain it'd be more proper to write "informar de" although it is widely accepted.

Also, just a side note, when writting this file I realized that although the root for Spanish is the one from Spain and according to the Accademy it should be the "_es" due to the large amount of countries using Spanish, the "_es" should be the artificial Standard Spanish (it is not actually used, it's just an standard that is supposedly understood by any Spanish speaker but every zone has it's own variation, http://en.wikipedia.org/wiki/Standard_Spanish ) and apply the local fixes through the country suffix (_es_ES in this case).

Comment by kleopatra [ 10/Dec/12 11:02 AM ]

LoginPane_es.properties (as contributed by dsmania) committed as of revision #4269

thanks - and please feel free to contribute variations, if you deem appropriate





Generated at Sun Apr 20 01:54:59 UTC 2014 using JIRA 4.0.2#472.