You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An Arabic user noticed that the tab close buttons were on the left of the tabs, but thought they should be on the right.
I'm not sure whether the user is right or not, so I'm passing the question upwards. JIDE currently puts them on the left because it's the reverse of where they would be for a left-to-right layout. But sometimes in right-to-left UIs, things are not reversed. I wasn't able to quickly find any literature describing the correct behaviour for tab close buttons, so all I have to go on is this one user's comment.
Test program:
import java.awt.BorderLayout;
import java.awt.ComponentOrientation;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import javax.swing.WindowConstants;
import com.jidesoft.swing.JideTabbedPane;
public class TestRtlTab implements Runnable {
public static void main(String[] args) {
System.setProperty("user.language", "ar");
System.setProperty("user.country", "SA");
SwingUtilities.invokeLater(new TestRtlTab());
}
@Override
public void run() {
showFrame("Left-to-Right", ComponentOrientation.LEFT_TO_RIGHT);
showFrame("Right-to-Left", ComponentOrientation.RIGHT_TO_LEFT);
}
private void showFrame(String title, ComponentOrientation componentOrientation) {
JideTabbedPane tabs = new JideTabbedPane();
tabs.setShowCloseButtonOnTab(true);
tabs.add("Tab 1", new JPanel());
tabs.add("Tab 2", new JPanel());
tabs.setComponentOrientation(componentOrientation);
JPanel content = new JPanel();
content.setLayout(new BorderLayout());
content.add(tabs, BorderLayout.CENTER);
content.setComponentOrientation(componentOrientation);
JFrame frame = new JFrame(title);
frame.setContentPane(content);
frame.setComponentOrientation(componentOrientation);
frame.pack();
frame.setSize(500, 400);
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
frame.setVisible(true);
}
}
The text was updated successfully, but these errors were encountered:
An Arabic user noticed that the tab close buttons were on the left of the tabs, but thought they should be on the right.
I'm not sure whether the user is right or not, so I'm passing the question upwards. JIDE currently puts them on the left because it's the reverse of where they would be for a left-to-right layout. But sometimes in right-to-left UIs, things are not reversed. I wasn't able to quickly find any literature describing the correct behaviour for tab close buttons, so all I have to go on is this one user's comment.
Test program:
The text was updated successfully, but these errors were encountered: