Search in sources :

Example 1 with GUIStreams

use of gui.forms.GUIStreams in project Botnak by Gocnak.

the class NewTabListener method mouseReleased.

@Override
public void mouseReleased(MouseEvent e) {
    //ensure it's the add new stream tab
    DraggableTabbedPane pane = (DraggableTabbedPane) e.getSource();
    int idx = pane.getUI().tabForCoordinate(pane, e.getX(), e.getY());
    if (idx != -1 && !pane.dragging && pane.getTitleAt(idx).equals("+")) {
        if (SwingUtilities.isLeftMouseButton(e)) {
            if (GUIMain.streams == null) {
                GUIMain.streams = new GUIStreams();
            }
            GUIMain.streams.setVisible(true);
        } else if (SwingUtilities.isRightMouseButton(e)) {
        //TODO make the topic tab GUI
        }
    }
}
Also used : GUIStreams(gui.forms.GUIStreams) DraggableTabbedPane(gui.DraggableTabbedPane)

Aggregations

DraggableTabbedPane (gui.DraggableTabbedPane)1 GUIStreams (gui.forms.GUIStreams)1