Package javax.swing.plaf

Examples of javax.swing.plaf.TabbedPaneUI


        @Override
        public void mouseDragged(MouseEvent e) {
            // Gets the tab index based on the mouse position
            if (!isDragging) {
                TabbedPane pane = TabbedPane.this;
                TabbedPaneUI paneUI = pane.getUI();
                dragIndex = paneUI.tabForCoordinate(pane, e.getX(), e.getY());
                if (dragIndex >= 0) {
                    Rectangle bounds = paneUI.getTabBounds(pane, dragIndex);
                    // Paint the tabbed pane to a buffer
                    Image totalImage = new BufferedImage(getWidth(), getHeight(),
                            BufferedImage.TYPE_INT_ARGB);
                    Graphics totalGraphics = totalImage.getGraphics();
                    totalGraphics.setClip(bounds);
View Full Code Here


        @Override
        public void mouseClicked(MouseEvent e) {
            System.out.println("close plz!");
            if ((e.getModifiers() & MouseEvent.BUTTON2_MASK) != 0) {
                TabbedPane pane = TabbedPane.this;
                TabbedPaneUI paneUI = pane.getUI();
                // close tab
                int index = paneUI.tabForCoordinate(pane, e.getX(), e.getY());
                if (index < 0) {
                    return;
                }
                RoomPane room = (RoomPane) pane.getComponentAt(index);
                if (!room.isLobby()) {
View Full Code Here

TOP

Related Classes of javax.swing.plaf.TabbedPaneUI

Copyright © 2018 www.massapicom. 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.