Java Code Examples for javax.swing.JPanel#applyComponentOrientation()

The following examples show how to use javax.swing.JPanel#applyComponentOrientation() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Panels.java    From RipplePower with Apache License 2.0 5 votes vote down vote up
public static JPanel newPanel(LayoutManager2 layout) {
	JPanel panel = new JPanel(layout);
	panel.setBackground(UIConfig.dialogbackground);
	panel.setOpaque(false);
	panel.applyComponentOrientation(LangConfig.currentComponentOrientation());
	return panel;
}
 
Example 2
Source File: JPanelMenu.java    From nordpos with GNU General Public License v3.0 5 votes vote down vote up
public void addTitle(Component title) {
    
    currententrypanel = null;
    
    JPanel titlepanel = new JPanel();
    titlepanel.setLayout(new java.awt.BorderLayout());
    titlepanel.add(title, java.awt.BorderLayout.CENTER);     
    titlepanel.applyComponentOrientation(getComponentOrientation());
    
    menucontainer.add(titlepanel);
}
 
Example 3
Source File: JMarkerEdit.java    From nordpos with GNU General Public License v3.0 5 votes vote down vote up
private void init() {
    setTitle(AppLocal.getIntString("label.marker"));
    treeMap = new JMapViewerTree("Markers");
    initComponents();
    getRootPane().setDefaultButton(m_jButtonOK);

    map().addJMVListener(this);
    map().setScrollWrapEnabled(true);

    JPanel jLocations = new JPanel();
    jLocations.applyComponentOrientation(getComponentOrientation());
    jLocations.setLayout(new BorderLayout());
    jLocations.setBorder(new javax.swing.border.CompoundBorder(
            new javax.swing.border.EmptyBorder(new Insets(5, 5, 5, 5)),
            new javax.swing.border.TitledBorder(treeMap.getName())));
    JPanel jPanCont = new JPanel();
    jPanCont.applyComponentOrientation(getComponentOrientation());

    m_jPanelMap.add(jLocations, BorderLayout.CENTER);
    jLocations.add(treeMap, BorderLayout.CENTER);

    map().addMouseListener(new java.awt.event.MouseAdapter() {
        @Override
        public void mouseClicked(MouseEvent e) {
            JMapViewerMouseClicked(e);
        }
    });
}
 
Example 4
Source File: JTicketsBagLocationMap.java    From nordpos with GNU General Public License v3.0 5 votes vote down vote up
public JTicketsBagLocationMap(AppView app, TicketsEditor panelticket) {

        super(app, panelticket);

        dlGeomap = (DataLogicGeomap) app.getBean(DataLogicGeomap.class.getName());

        treeMap = new JMapViewerTree("Tickets");
        m_location = new JTicketsBagLocation(app, this);
        initComponents();
        map().addJMVListener(this);
        map().setScrollWrapEnabled(true);

        JPanel jLocations = new JPanel();
        jLocations.applyComponentOrientation(getComponentOrientation());
        jLocations.setLayout(new BorderLayout());
        jLocations.setBorder(new javax.swing.border.CompoundBorder(
                new javax.swing.border.EmptyBorder(new Insets(5, 5, 5, 5)),
                new javax.swing.border.TitledBorder(treeMap.getName())));
        JPanel jPanCont = new JPanel();
        jPanCont.applyComponentOrientation(getComponentOrientation());

        m_jPanelMap.add(jLocations, BorderLayout.CENTER);
        jLocations.add(treeMap, BorderLayout.CENTER);

        map().addMouseListener(new java.awt.event.MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                JMapViewerMouseClicked(e);
            }
        });

        currentLayer = new Layer("Current");
        currentMarker = new MapMarkerDot(currentLayer, new Coordinate(0, 0));

        try {
            reload();
        } catch (BasicException ex) {
            Logger.getLogger(JTicketsBagLocationMap.class.getName()).log(Level.SEVERE, null, ex);
        }
    }