Package javax.swing

Examples of javax.swing.JDialog.applyComponentOrientation()


      JComponent parentComponent = SwingUtilities.getRootPane((JComponent)textureChoiceComponent);
      if (parentComponent != null) {
        optionPane.setComponentOrientation(parentComponent.getComponentOrientation());
      }
      final JDialog dialog = optionPane.createDialog(parentComponent, controller.getDialogTitle());
      dialog.applyComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
      dialog.setResizable(true);
      // Pack again because resize decorations may have changed dialog preferred size
      dialog.pack();
      dialog.setMinimumSize(getPreferredSize());
      // Add a listener that transfer focus to focusable field of texture panel when dialog is shown
View Full Code Here


        JOptionPane.PLAIN_MESSAGE, JOptionPane.DEFAULT_OPTION);
    if (parentView != null) {
      optionPane.setComponentOrientation(((JComponent)parentView).getComponentOrientation());
    }
    JDialog dialog = optionPane.createDialog(SwingUtilities.getRootPane((JComponent)parentView), dialogTitle);
    dialog.applyComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));   
    dialog.setResizable(true);
    // Pack again because resize decorations may have changed dialog preferred size
    dialog.pack();
    dialog.setMinimumSize(dialog.getPreferredSize());
    dialog.setVisible(true);
View Full Code Here

  public static void showDialog(JComponent component, boolean modal) {
    JDialog dialog = new JDialog(EIMSAppFrame.getInstance().getFrame(),
        modal);
    dialog.setTitle(component.getName());
    dialog.add(component);
    dialog.applyComponentOrientation(EIMSAppFrame.getInstance().getFrame()
        .getComponentOrientation());
    dialog.pack();
    Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
    Dimension window = dialog.getSize();
    if (window.height > screen.height) {
View Full Code Here

  public static void showDialog(JComponent component, boolean modal) {
    JDialog dialog = new JDialog(MainAppFrame.getInstance(),
        modal);
    dialog.setTitle(component.getName());
    dialog.add(component);
    dialog.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
    dialog.pack();
    dialog.setLocationRelativeTo(null);
    dialog.setVisible(true);

  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.