buttonPanel.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); FlowLayout fl = new FlowLayout(); fl.setAlignment(FlowLayout.RIGHT);
/** * Overridden to ensure that the cursor for this component is appropriate * for the orientation. * * @param o The new orientation. */ @Override public void applyComponentOrientation(ComponentOrientation o) { possiblyFixCursor(o.isLeftToRight()); super.applyComponentOrientation(o); }
private JPanel makePanel() { JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEADING)); panel.applyComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault())); ... }
private JPanel makePanel() { JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEADING)); panel.add(new JLabel("First")); panel.applyComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault())); panel.add(new JLabel("Second")); return panel; }
/** * @param layout The layout manager for the panel (typically MigLayout) * * @return A simple theme-aware detail panel with the given layout */ public static JPanel newPanel(LayoutManager2 layout) { JPanel panel = new JPanel(layout); // Theme panel.setBackground(Themes.currentTheme.detailPanelBackground()); // Force transparency panel.setOpaque(false); // Ensure LTR and RTL is detected by the layout panel.applyComponentOrientation(Languages.currentComponentOrientation()); return panel; }
/** * Overridden to ensure that the cursor for this component is appropriate * for the orientation. * * @param o The new orientation. */ public void applyComponentOrientation(ComponentOrientation o) { possiblyFixCursor(o.isLeftToRight()); super.applyComponentOrientation(o); }
/** * Overridden to ensure that the cursor for this component is appropriate * for the orientation. * * @param o The new orientation. */ public void applyComponentOrientation(ComponentOrientation o) { possiblyFixCursor(o.isLeftToRight()); super.applyComponentOrientation(o); }
/** * Overridden to ensure that the cursor for this component is appropriate * for the orientation. * * @param o The new orientation. */ @Override public void applyComponentOrientation(ComponentOrientation o) { possiblyFixCursor(o.isLeftToRight()); super.applyComponentOrientation(o); }
/** * Overridden to ensure that the cursor for this component is appropriate * for the orientation. * * @param o The new orientation. */ @Override public void applyComponentOrientation(ComponentOrientation o) { possiblyFixCursor(o.isLeftToRight()); super.applyComponentOrientation(o); }
/** * Overridden to ensure that the cursor for this component is appropriate * for the orientation. * * @param o The new orientation. */ public void applyComponentOrientation(ComponentOrientation o) { possiblyFixCursor(o.isLeftToRight()); super.applyComponentOrientation(o); }
inner.add(new JLabel("RToL")); outer.add(inner); outer.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); return outer;
@Override public void actionPerformed(ActionEvent e) { // System.out.println("Rollover action"); PrimaryRolloverCallback callback = menuEntry .getRolloverCallback(); if (callback != null) { callback .menuEntryActivated(panelLevel2); } else { // default callback? PrimaryRolloverCallback defaultCallback = ribbonAppMenu .getDefaultCallback(); if (defaultCallback != null) { defaultCallback .menuEntryActivated(panelLevel2); } else { panelLevel2.removeAll(); panelLevel2.revalidate(); panelLevel2.repaint(); } } panelLevel2 .applyComponentOrientation(applicationMenuPopupPanel .getComponentOrientation()); } });
/** * Handle show panel. * * @param panel * the panel */ public void handleShowPanel(final JPanel panel) { if (panel == null) { // do nothing return; } this.showAnotherPanel = true; if (this.centerPanel != null) { remove(this.centerPanel); } panel.applyComponentOrientation(SwingUtility.getDefaultComponentOrientation()); // panel.setMinimumSize(new Dimension(900,600)); // JScrollPane pane=new JScrollPane(panel); add(panel, BorderLayout.CENTER); this.centerPanel = panel; this.centerPanel.setBorder(BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED, Color.DARK_GRAY, Color.black)); validate(); repaint(); this.centerPanel.requestFocus(); this.showAnotherPanel = false; }
detailsButton.setText(translationProvider.getTranslation("details", locale) + "<<"); detailsPanel.applyComponentOrientation(detailsButton .getComponentOrientation()); detailsPane.setCaretPosition(0);
locale) + "<<"); detailsPanel.applyComponentOrientation(detailsButton .getComponentOrientation()); detailsPane.setCaretPosition(0);
detailsPanel.setVisible(true); configureDetailsButton(true); detailsPanel.applyComponentOrientation(detailButton.getComponentOrientation());
detailsPanel.setVisible(true); configureDetailsButton(true); detailsPanel.applyComponentOrientation(detailButton.getComponentOrientation());
detailsPanel.setVisible(true); configureDetailsButton(true); detailsPanel.applyComponentOrientation(detailButton.getComponentOrientation());
detailsPanel.setVisible(true); configureDetailsButton(true); detailsPanel.applyComponentOrientation(detailButton.getComponentOrientation());
detailsPanel.setVisible(true); configureDetailsButton(true); detailsPanel.applyComponentOrientation(detailButton.getComponentOrientation());