menu.add(menuItem); tabbedPane.addMouseListener(new PopupListener(menu));
house.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT); house.addChangeListener(new TabChangeListener()); house.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) {
/** Constructs a new tabbedPane manager for a given JTabbedPane */ public JTabbedPaneSmartIconManager(JTabbedPane tabbedPane) { this.tabbedPane = tabbedPane; tabbedPane.addMouseListener(this); tabbedPane.addMouseMotionListener(this); }
@Override protected void installListeners() { super.installListeners(); tabPane.addMouseListener(new MouseAdapter() { @Override public void mouseReleased(MouseEvent e) { if(tabPane == null) { return; } int tabIndex = tabForCoordinate(tabPane, e.getX(), e.getY()); if(tabIndex != -1) { handleTabClicked(e, tabIndex); } } }); }
public XJTabbedPane() { setLayout(new BorderLayout()); tabbedPane.addMouseListener(new TabbedPaneMouseListener()); }
public void enableReordering() { if (tabReorderingHandler == null) { tabReorderingHandler = new TabReorderHandler(); } tabPane.addMouseListener(tabReorderingHandler); tabPane.addMouseMotionListener(tabReorderingHandler); }
@Override public void installListeners() { this.baseRolloverHandler = new MouseRolloverHandler(); this.jcomp.addMouseMotionListener(this.baseRolloverHandler); this.jcomp.addMouseListener(this.baseRolloverHandler); }
protected void installDefaults() { super.installDefaults(); RollOverListener l = new RollOverListener(); tabPane.addMouseListener(l); tabPane.addMouseMotionListener(l); tabAreaInsets = NO_INSETS; tabInsets = new Insets(0, 0, 0, 1); }
protected void installDefaults() { super.installDefaults(); RollOverListener l = new RollOverListener(); tabPane.addMouseListener(l); tabPane.addMouseMotionListener(l); tabAreaInsets = NO_INSETS; tabInsets = new Insets(0, 0, 0, 1); }
protected void installDefaults() { super.installDefaults(); RollOverListener l = new RollOverListener(); tabPane.addMouseListener(l); tabPane.addMouseMotionListener(l); tabAreaInsets = NO_INSETS; tabInsets = new Insets(0, 0, 0, 1); }
protected void installDefaults() { super.installDefaults(); RollOverListener l = new RollOverListener(); tabPane.addMouseListener(l); tabPane.addMouseMotionListener(l); tabAreaInsets = NO_INSETS; tabInsets = new Insets(0, 0, 0, 1); }
protected void installDefaults() { super.installDefaults(); RollOverListener l = new RollOverListener(); tabPane.addMouseListener(l); tabPane.addMouseMotionListener(l); tabAreaInsets = NO_INSETS; tabInsets = new Insets(0, 0, 0, 1); }
protected void installListeners() { super.installListeners(); miml = new MiML(); tabPane.addMouseMotionListener( miml); tabPane.addMouseListener( miml); }
/** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jTabbedPane1 = new javax.swing.JTabbedPane(); clusteringSetupTab = new moa.gui.clustertab.ClusteringSetupTab(); clusteringVisualTab = new moa.gui.clustertab.ClusteringVisualTab(); setLayout(new java.awt.BorderLayout()); jTabbedPane1.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jTabbedPane1MouseClicked(evt); } }); jTabbedPane1.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { jTabbedPane1FocusGained(evt); } }); jTabbedPane1.addTab("Setup", clusteringSetupTab); jTabbedPane1.addTab("Visualization", clusteringVisualTab); add(jTabbedPane1, java.awt.BorderLayout.CENTER); }// </editor-fold>//GEN-END:initComponents
private void initialiseGui() { cellRenderer = new SVTableCellRenderer(this.wb); if (allowEdits) cellEditor = new SVTableCellEditor(this.wb); //Initialise the Panel sheetPane = new JTabbedPane(JTabbedPane.BOTTOM); if (allowEdits) sheetPane.addMouseListener(createTabListener()); int sheetCount = wb.getNumberOfSheets(); for (int i=0; i<sheetCount;i++) { String sheetName = wb.getSheetName(i); //Add the new sheet to the tabbed pane sheetPane.addTab(sheetName, makeSheetView(wb.getSheetAt(i))); } setLayout(new BorderLayout()); add(sheetPane, BorderLayout.CENTER); }
private void initialiseGui() { cellRenderer = new SVTableCellRenderer(this.wb); if (allowEdits) cellEditor = new SVTableCellEditor(this.wb); //Initialise the Panel sheetPane = new JTabbedPane(JTabbedPane.BOTTOM); if (allowEdits) sheetPane.addMouseListener(createTabListener()); int sheetCount = wb.getNumberOfSheets(); for (int i=0; i<sheetCount;i++) { String sheetName = wb.getSheetName(i); //Add the new sheet to the tabbed pane sheetPane.addTab(sheetName, makeSheetView(wb.getSheetAt(i))); } setLayout(new BorderLayout()); add(sheetPane, BorderLayout.CENTER); }
private void initialiseGui() { cellRenderer = new SVTableCellRenderer(this.wb); if (allowEdits) cellEditor = new SVTableCellEditor(this.wb); //Initialise the Panel sheetPane = new JTabbedPane(JTabbedPane.BOTTOM); if (allowEdits) sheetPane.addMouseListener(createTabListener()); int sheetCount = wb.getNumberOfSheets(); for (int i=0; i<sheetCount;i++) { String sheetName = wb.getSheetName(i); //Add the new sheet to the tabbed pane sheetPane.addTab(sheetName, makeSheetView(wb.getSheetAt(i))); } setLayout(new BorderLayout()); add(sheetPane, BorderLayout.CENTER); }
@Override protected void initComponents() { super.initComponents(); tabbedPane = TabbedPaneFactory.createCloseButtonTabbedPane(); tabbedPane.addPropertyChangeListener(new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { if (evt.getPropertyName().equals(TabbedPaneFactory.PROP_CLOSE)) { JComponent comp = (JComponent) evt.getNewValue(); remove(comp); } } }); tabbedPane.addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { checkSelectionChange(); } }); popL = new PopupListener(); tabbedPane.addMouseListener(popL); }
/** Creates a new instance of ResultWindow */ @NbBundle.Messages({"TITLE_TEST_RESULTS=Test Results", "ACSN_TestResults=Test Results", "ACSD_TestResults=Displays information about passed and failed tests and output generated by them"}) public ResultWindow() { super(); setFocusable(true); setLayout(new BorderLayout()); setName(ID); setDisplayName(Bundle.TITLE_TEST_RESULTS()); setIcon(ImageUtilities.loadImage( "org/netbeans/modules/gsf/testrunner/ui/resources/testResults.png", true));//NOI18N AccessibleContext accContext = getAccessibleContext(); accContext.setAccessibleName(Bundle.ACSN_TestResults()); accContext.setAccessibleDescription(Bundle.ACSD_TestResults()); pop = new JPopupMenu(); pop.add(new Close()); pop.add(new CloseAll()); pop.add(new CloseAllButCurrent()); popL = new PopupListener(); closeL = new CloseListener(); tabPane = TabbedPaneFactory.createCloseButtonTabbedPane(); tabPane.setMinimumSize(new Dimension(0, 0)); tabPane.addMouseListener(popL); tabPane.addPropertyChangeListener(closeL); add(tabPane); }
protected void installListeners() { super.installListeners(); if (tabHandler == null) { tabHandler = new TabRolloverHandler(); } tabPane.addMouseListener(tabHandler); tabPane.addMouseMotionListener(tabHandler); if (propHandler == null) { propHandler = new MyPropertyChangeHandler(); } tabPane.addPropertyChangeListener(propHandler); if (PlafOptions.isWheelTabbedPaneEnabled()) { if (tabScrollHandler == null) { tabScrollHandler = new TabbedPaneMouseWheelScroller(); } tabPane.addMouseWheelListener(tabScrollHandler); } if (PlafOptions.isTabbedPaneRightClickSelectionEnabled()) { if (tabSelectionHandler == null) { tabSelectionHandler = new TabSelectionMouseHandler(); } tabPane.addMouseListener(tabSelectionHandler); } if (PlafOptions.isTabReorderingEnabled()) { enableReordering(); } }