public StudyStepicUserWidget() { StepicUser user = StudySettings.getInstance().getUser(); Icon icon = user == null ? EducationalCoreIcons.StepikOff : EducationalCoreIcons.Stepik; myComponent = new JLabel(icon); new ClickListener() { @Override public boolean onClick(@NotNull MouseEvent e, int clickCount) { Point point = new Point(0, 0); StepicUserComponent component = new StepicUserComponent(StudySettings.getInstance().getUser()); final Dimension dimension = component.getPreferredSize(); point = new Point(point.x - dimension.width, point.y - dimension.height); component.showComponent(new RelativePoint(e.getComponent(), point)); return true; } }.installOn(myComponent); }
MyColorButton() { setMargin(new Insets(0, 0, 0, 0)); setDefaultCapable(false); setFocusable(false); if (SystemInfo.isMac) { putClientProperty("JButton.buttonType", "square"); } new ClickListener() { @Override public boolean onClick(@NotNull MouseEvent e, int clickCount) { if (myCheckbox.isSelected()) { final Color color = ColorChooser.chooseColor(myCheckbox, "Chose color", CheckBoxWithColorChooser.this.myColor); if (color != null) { myColor = color; MyColorButton.this.repaint(); if (myUpdateRunnable != null) { myUpdateRunnable.run(); } } } return true; } }.installOn(this); }
private MultipleTextValuesPresentationWrapper(@NotNull final StatusBarWidget.MultipleTextValuesPresentation presentation) { super(); myPresentation = presentation; putClientProperty(UIUtil.CENTER_TOOLTIP_DEFAULT, Boolean.TRUE); setToolTipText(presentation.getTooltipText()); new ClickListener() { @Override public boolean onClick(@NotNull MouseEvent e, int clickCount) { final ListPopup popup = myPresentation.getPopupStep(); if (popup == null) return false; final Dimension dimension = popup.getContent().getPreferredSize(); final Point at = new Point(0, -dimension.height); popup.show(new RelativePoint(e.getComponent(), at)); return true; } }.installOn(this); setOpaque(false); }
public Advertiser() { myNextLabel = new JLabel(">>"); myNextLabel.setFont(adFont().deriveFont( ContainerUtil.<TextAttribute, Object>immutableMapBuilder().put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON).build())); myNextLabel.setForeground(JBColor.blue); new ClickListener() { @Override public boolean onClick(@NotNull MouseEvent e, int clickCount) { myCurrentItem++; updateAdvertisements(); return true; } }.installOn(myNextLabel); myNextLabel.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); GridBag gb = new GridBag(); myComponent.add(myTextPanel, gb.next()); myComponent.add(myNextLabel, gb.next()); myComponent.add(new NonOpaquePanel(), gb.next().fillCellHorizontally().weightx(1)); }
public PyConfigureInterpretersLinkPanel(final JPanel parentPanel) { super(new BorderLayout()); myConfigureLabel = new JBLabel("<html><a href=\"#\">Configure Interpreters"); myConfigureLabel.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); new ClickListener() { @Override public boolean onClick(@NotNull MouseEvent e, int clickCount) { if (clickCount == 1) { Settings settings = Settings.KEY.getData(DataManager.getInstance().getDataContext(parentPanel)); if (settings != null) { settings.select(settings.find(PyActiveSdkModuleConfigurable.class.getName())); return true; } } return false; } }.installOn(myConfigureLabel); add(myConfigureLabel, BorderLayout.CENTER); }
public LightBulbComponentImpl(@NotNull final QuickFixManager manager, @NotNull final Icon icon) { myManager = manager; myIcon = icon; setPreferredSize(new Dimension(icon.getIconWidth(), icon.getIconHeight())); final String acceleratorsText = KeymapUtil.getFirstKeyboardShortcutText( ActionManager.getInstance().getAction(IdeActions.ACTION_SHOW_INTENTION_ACTIONS)); if (acceleratorsText.length() > 0) { setToolTipText(UIDesignerBundle.message("tooltip.press.accelerator", acceleratorsText)); } new ClickListener() { @Override public boolean onClick(@NotNull MouseEvent e, int clickCount) { myManager.showIntentionPopup(); return true; } }.installOn(this); }
public FilterDropDown() { this.group = new DefaultActionGroup(); this.clickListener = new ClickListener() { @Override public boolean onClick(MouseEvent event, int clickCount) { showDropDownMenu(); return true; } }; this.keyAdapter = new KeyAdapter() { @Override public void keyPressed(KeyEvent keyEvent) { if (keyEvent.getKeyCode() == KeyEvent.VK_ENTER || keyEvent.getKeyCode() == KeyEvent.VK_DOWN) { showDropDownMenu(); } } }; }
private MultipleTextValuesPresentationWrapper(@NotNull final StatusBarWidget.MultipleTextValuesPresentation presentation) { super(); myPresentation = presentation; putClientProperty(UIUtil.CENTER_TOOLTIP_DEFAULT, Boolean.TRUE); setToolTipText(presentation.getTooltipText()); new ClickListener() { @Override public boolean onClick(MouseEvent e, int clickCount) { final ListPopup popup = myPresentation.getPopupStep(); if (popup == null) return false; final Dimension dimension = popup.getContent().getPreferredSize(); final Point at = new Point(0, -dimension.height); popup.show(new RelativePoint(e.getComponent(), at)); return true; } }.installOn(this); setOpaque(false); }
public LineSeparatorPanel(@NotNull final Project project) { super(project); myComponent = new TextPanel() { @Override protected void paintComponent(@NotNull final Graphics g) { super.paintComponent(g); if (myActionEnabled && getText() != null) { final Rectangle r = getBounds(); final Insets insets = getInsets(); AllIcons.Ide.Statusbar_arrows.paintIcon(this, g, r.width - insets.right - AllIcons.Ide.Statusbar_arrows.getIconWidth() - 2, r.height / 2 - AllIcons.Ide.Statusbar_arrows.getIconHeight() / 2); } } }; new ClickListener() { @Override public boolean onClick(MouseEvent e, int clickCount) { update(); showPopup(e); return true; } }.installOn(myComponent); myComponent.setBorder(WidgetBorder.INSTANCE); }
public EncodingPanel(@NotNull final Project project) { super(project); update = new Alarm(this); myComponent = new TextPanel() { @Override protected void paintComponent(@NotNull final Graphics g) { super.paintComponent(g); if (actionEnabled && getText() != null) { final Rectangle r = getBounds(); final Insets insets = getInsets(); AllIcons.Ide.Statusbar_arrows.paintIcon(this, g, r.width - insets.right - AllIcons.Ide.Statusbar_arrows.getIconWidth() - 2, r.height / 2 - AllIcons.Ide.Statusbar_arrows.getIconHeight() / 2); } } }; new ClickListener() { @Override public boolean onClick(MouseEvent e, int clickCount) { update(); showPopup(e); return true; } }.installOn(myComponent); myComponent.setBorder(WidgetBorder.INSTANCE); }
public void addMouseListenerToHeaderInTable(JTable table) { final TableSorter sorter = this; final JTable tableView = table; tableView.setColumnSelectionAllowed(false); new ClickListener() { @Override public boolean onClick(MouseEvent e, int clickCount) { TableColumnModel columnModel = tableView.getColumnModel(); int viewColumn = columnModel.getColumnIndexAtX(e.getX()); int column = tableView.convertColumnIndexToModel(viewColumn); if (clickCount == 1 && column != -1) { //System.out.println("Sorting ..."); int shiftPressed = e.getModifiers() & InputEvent.SHIFT_MASK; boolean ascending = (shiftPressed == 0); sorter.sortByColumn(column, ascending); return true; } return false; } }.installOn(tableView.getTableHeader()); }
public Advertiser() { myNextLabel = new JLabel(">>"); myNextLabel.setFont(adFont().deriveFont( ContainerUtil.<TextAttribute, Object>immutableMapBuilder().put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON).build())); myNextLabel.setForeground(JBColor.blue); new ClickListener() { @Override public boolean onClick(MouseEvent e, int clickCount) { myCurrentItem++; updateAdvertisements(); return true; } }.installOn(myNextLabel); myNextLabel.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); GridBag gb = new GridBag(); myComponent.add(myTextPanel, gb.next()); myComponent.add(myNextLabel, gb.next()); myComponent.add(new NonOpaquePanel(), gb.next().fillCellHorizontally().weightx(1)); }
public LightBulbComponentImpl(@NotNull final QuickFixManager manager, @NotNull final Icon icon) { myManager = manager; myIcon = icon; setPreferredSize(new Dimension(icon.getIconWidth(), icon.getIconHeight())); final String acceleratorsText = KeymapUtil.getFirstKeyboardShortcutText( ActionManager.getInstance().getAction(IdeActions.ACTION_SHOW_INTENTION_ACTIONS)); if (acceleratorsText.length() > 0) { setToolTipText(UIDesignerBundle.message("tooltip.press.accelerator", acceleratorsText)); } new ClickListener() { @Override public boolean onClick(MouseEvent e, int clickCount) { myManager.showIntentionPopup(); return true; } }.installOn(this); }
FileLanguagePanel(@NotNull final Project project) { super(project); myComponent = new TextPanel.ExtraSize() { @Override protected void paintComponent(@NotNull final Graphics g) { super.paintComponent(g); if (myActionEnabled && getText() != null) { final Rectangle r = getBounds(); final Insets insets = getInsets(); AllIcons.Ide.Statusbar_arrows.paintIcon(this, g, r.width - insets.right - AllIcons.Ide.Statusbar_arrows.getIconWidth() - 2, r.height / 2 - AllIcons.Ide.Statusbar_arrows.getIconHeight() / 2); } } }; new ClickListener() { @Override public boolean onClick(@NotNull MouseEvent e, int clickCount) { update(); showPopup(e); return true; } }.installOn(myComponent); myComponent.setBorder(WidgetBorder.WIDE); }
public ModuleLayerWidget(@Nonnull Project project) { super(project); myComponent = new TextPanel() { @Override protected void paintComponent(@Nonnull final Graphics g) { super.paintComponent(g); if (myActionEnabled && getText() != null) { final Rectangle r = getBounds(); final Insets insets = getInsets(); AllIcons.Ide.Statusbar_arrows.paintIcon(this, g, r.width - insets.right - AllIcons.Ide.Statusbar_arrows.getIconWidth() - 2, r.height / 2 - AllIcons.Ide.Statusbar_arrows.getIconHeight() / 2); } } }; new ClickListener() { @Override public boolean onClick(MouseEvent e, int clickCount) { update(); showPopup(e); return true; } }.installOn(myComponent); myComponent.setBorder(WidgetBorder.INSTANCE); }
private MultipleTextValuesPresentationWrapper(@Nonnull final StatusBarWidget.MultipleTextValuesPresentation presentation) { super(); myPresentation = presentation; putClientProperty(UIUtil.CENTER_TOOLTIP_DEFAULT, Boolean.TRUE); setToolTipText(presentation.getTooltipText()); new ClickListener() { @Override public boolean onClick(@Nonnull MouseEvent e, int clickCount) { final ListPopup popup = myPresentation.getPopupStep(); if (popup == null) return false; final Dimension dimension = popup.getContent().getPreferredSize(); final Point at = new Point(0, -dimension.height); popup.show(new RelativePoint(e.getComponent(), at)); return true; } }.installOn(this); setOpaque(false); }
public LineSeparatorPanel(@Nonnull final Project project) { super(project); myComponent = new TextPanel.ExtraSize() { @Override protected void paintComponent(@Nonnull final Graphics g) { super.paintComponent(g); if (myActionEnabled && getText() != null) { final Rectangle r = getBounds(); final Insets insets = getInsets(); Icon arrows = AllIcons.Ide.Statusbar_arrows; arrows.paintIcon(this, g, r.width - insets.right - arrows.getIconWidth() - 2, r.height / 2 - arrows.getIconHeight() / 2); } } }; new ClickListener() { @Override public boolean onClick(@Nonnull MouseEvent e, int clickCount) { update(); showPopup(e); return true; } }.installOn(myComponent); myComponent.setBorder(WidgetBorder.WIDE); }
private void showPopupMenuOnClick() { new ClickListener() { @Override public boolean onClick(@NotNull MouseEvent event, int clickCount) { showPopupMenu(); return true; } }.installOn(myNameLabel); }
private void showPopupMenuOnClick() { new ClickListener() { @Override public boolean onClick(@NotNull MouseEvent event, int clickCount) { showPopupMenu(); return true; } }.installOn(this); }
protected OpenOrAttachDialog(Project project, boolean hideReplace, final String title) { super(project); myHideReplace = hideReplace; setTitle(title); init(); ClickListener listener = new DoubleClickListener() { @Override protected boolean onDoubleClick(MouseEvent event) { doOKAction(); return true; } }; listener.installOn(myCurrentWindowButton); listener.installOn(myOpenInNewWindowButton); final String mode = PropertiesComponent.getInstance().getValue(MODE_PROPERTY); if (MODE_NEW.equals(mode)) { myOpenInNewWindowButton.setSelected(true); } else if (mode == null || MODE_REPLACE.equals(mode) || hideReplace) { myCurrentWindowButton.setSelected(true); myAddCheckbox.setSelected(false); } else { myCurrentWindowButton.setSelected(true); myAddCheckbox.setSelected(true); } if (hideReplace) { myAddCheckbox.setVisible(false); } myAddCheckbox.setEnabled(myCurrentWindowButton.isSelected()); final ActionListener listener1 = new ActionListener() { @Override public void actionPerformed(ActionEvent e) { myAddCheckbox.setEnabled(myCurrentWindowButton.isSelected()); } }; myCurrentWindowButton.addActionListener(listener1); myOpenInNewWindowButton.addActionListener(listener1); }
public LineSeparatorPanel(@NotNull final Project project) { super(project); myComponent = new TextPanel.ExtraSize() { @Override protected void paintComponent(@NotNull final Graphics g) { super.paintComponent(g); if (myActionEnabled && getText() != null) { final Rectangle r = getBounds(); final Insets insets = getInsets(); Icon arrows = AllIcons.Ide.Statusbar_arrows; arrows.paintIcon(this, g, r.width - insets.right - arrows.getIconWidth() - 2, r.height / 2 - arrows.getIconHeight() / 2); } } }; new ClickListener() { @Override public boolean onClick(@NotNull MouseEvent e, int clickCount) { update(); showPopup(e); return true; } }.installOn(myComponent); myComponent.setBorder(WidgetBorder.WIDE); }
public EncodingPanel(@NotNull final Project project) { super(project); update = new Alarm(this); myComponent = new TextPanel.ExtraSize() { @Override protected void paintComponent(@NotNull final Graphics g) { super.paintComponent(g); if (actionEnabled && getText() != null) { final Rectangle r = getBounds(); final Insets insets = getInsets(); Icon arrows = AllIcons.Ide.Statusbar_arrows; arrows.paintIcon(this, g, r.width - insets.right - arrows.getIconWidth() - 2, r.height / 2 - arrows.getIconHeight() / 2); } } }; new ClickListener() { @Override public boolean onClick(@NotNull MouseEvent e, int clickCount) { update(); showPopup(e); return true; } }.installOn(myComponent); myComponent.setBorder(WidgetBorder.WIDE); }
public TabbedContentTabLabel(TabbedContent content, TabContentLayout layout) { super(content, layout); myContent = content; new ClickListener() { @Override public boolean onClick(@NotNull MouseEvent event, int clickCount) { showPopup(); return true; } }.installOn(this); }
protected static JPanel createBigButtonPanel(LayoutManager layout, final JToggleButton anchorButton, final Runnable action) { final JPanel panel = new JPanel(layout) { @Override public Color getBackground() { return anchorButton.isSelected() ? getSelectionBackground() : super.getBackground(); } }; panel.setOpaque(anchorButton.isSelected()); new ClickListener() { @Override public boolean onClick(@NotNull MouseEvent event, int clickCount) { anchorButton.setSelected(true); return true; } }.installOn(panel); anchorButton.addItemListener(new ItemListener() { boolean curState = anchorButton.isSelected(); @Override public void itemStateChanged(ItemEvent e) { if (e.getStateChange() == ItemEvent.SELECTED && curState != anchorButton.isSelected()) { action.run(); } curState = anchorButton.isSelected(); panel.setOpaque(curState); panel.repaint(); } }); return panel; }
public IdeNotificationArea() { UISettings.getInstance().addUISettingsListener(new UISettingsListener() { @Override public void uiSettingsChanged(UISettings source) { updateStatus(); } }, this); new ClickListener() { @Override public boolean onClick(@NotNull MouseEvent e, int clickCount) { EventLog.toggleLog(getProject(), null); return true; } }.installOn(this); ApplicationManager.getApplication().getMessageBus().connect(this).subscribe(LogModel.LOG_MODEL_CHANGED, new Runnable() { @Override public void run() { ApplicationManager.getApplication().invokeLater(new Runnable() { @Override public void run() { updateStatus(); } }); } }); }
public IdeFatalErrorsIcon(ActionListener aListener) { myListener = aListener; setBorder(BorderFactory.createEmptyBorder(0, 1, 0, 1)); new ClickListener() { @Override public boolean onClick(@NotNull MouseEvent e, int clickCount) { if (myState != State.NoErrors) { myListener.actionPerformed(null); return true; } return false; } }.installOn(this); myIcon = new LayeredIcon(AllIcons.Ide.FatalError, AllIcons.Ide.FatalError_read, AllIcons.Ide.EmptyFatalError) { @Override public synchronized void paintIcon(Component c, Graphics g, int x, int y) { super.paintIcon(c, g, x, y); } @Override public synchronized void setLayerEnabled(int layer, boolean enabled) { super.setLayerEnabled(layer, enabled); } }; setIcon(myIcon); }
@Override public JComponent createCustomComponent(Presentation presentation) { // honestly borrowed from SearchTextField final JPanel panel = new JPanel(new BorderLayout()); final JLabel label = new JLabel(myIcon); label.setOpaque(true); label.setBackground(myField.getBackground()); myField.setOpaque(true); panel.add(myField, BorderLayout.WEST); panel.add(label, BorderLayout.EAST); myField.setToolTipText(myDescription); label.setToolTipText(myDescription); final Border originalBorder; if (SystemInfo.isMac) { originalBorder = BorderFactory.createLoweredBevelBorder(); } else { originalBorder = myField.getBorder(); } panel.setBorder(new CompoundBorder(IdeBorderFactory.createEmptyBorder(4, 0, 4, 0), originalBorder)); myField.setOpaque(true); myField.setBorder(IdeBorderFactory.createEmptyBorder(0, 5, 0, 5)); new ClickListener() { @Override public boolean onClick(@NotNull MouseEvent e, int clickCount) { actionPerformed(null); return true; } }.installOn(label); return panel; }
protected XDebuggerEditorBase(final Project project, @NotNull XDebuggerEditorsProvider debuggerEditorsProvider, @NotNull EvaluationMode mode, @Nullable @NonNls String historyId, final @Nullable XSourcePosition sourcePosition) { myProject = project; myDebuggerEditorsProvider = debuggerEditorsProvider; myMode = mode; myHistoryId = historyId; mySourcePosition = sourcePosition; myChooseFactory.setToolTipText(XDebuggerBundle.message("xdebugger.evaluate.language.hint")); myChooseFactory.setBorder(JBUI.Borders.empty(0, 3, 0, 3)); new ClickListener() { @Override public boolean onClick(@NotNull MouseEvent e, int clickCount) { ListPopup oldPopup = SoftReference.dereference(myPopup); if (oldPopup != null && !oldPopup.isDisposed()) { oldPopup.cancel(); myPopup = null; return true; } ListPopup popup = createLanguagePopup(); popup.showUnderneathOf(myChooseFactory); myPopup = new WeakReference<ListPopup>(popup); return true; } }.installOn(myChooseFactory); }
public TagsPanel(final String popupTitle) { super(new BorderLayout()); add(myTextLabel, BorderLayout.CENTER); add(myMoreLabel, BorderLayout.EAST); new ClickListener() { @Override public boolean onClick(@NotNull MouseEvent e, int clickCount) { showTags(); return true; } }.installOn(myMoreLabel); myPopupTitle = popupTitle; }
public DebuggerEditorImpl(Project project, PsiElement context, String recentsId, final CodeFragmentFactory factory) { myProject = project; myContext = context; myRecentsId = recentsId; PsiManager.getInstance(project).addPsiTreeChangeListener(myPsiListener); setFactory(factory); myInitialFactory = true; setFocusable(false); myChooseFactory.setToolTipText("Click to change the language"); myChooseFactory.setBorder(new EmptyBorder(0, 3, 0, 3)); new ClickListener() { @Override public boolean onClick(MouseEvent e, int clickCount) { ListPopup oldPopup = myPopup != null ? myPopup.get() : null; if (oldPopup != null && !oldPopup.isDisposed()) { oldPopup.cancel(); myPopup = null; return true; } if (myContext == null) { return true; } ListPopup popup = createLanguagePopup(); popup.showUnderneathOf(myChooseFactory); myPopup = new WeakReference<ListPopup>(popup); return true; } }.installOn(myChooseFactory); }
public StatusText() { myClickListener = new ClickListener() { @Override public boolean onClick(MouseEvent e, int clickCount) { if (e.getButton() == MouseEvent.BUTTON1 && clickCount == 1) { ActionListener actionListener = findActionListenerAt(e.getPoint()); if (actionListener != null) { actionListener.actionPerformed(new ActionEvent(this, 0, "")); return true; } } return false; } }; myMouseMotionListener = new MouseAdapter() { @Override public void mouseMoved(final MouseEvent e) { if (findActionListenerAt(e.getPoint()) != null) { myMouseTarget.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); } else { myMouseTarget.setCursor(Cursor.getDefaultCursor()); } } }; myComponent.setOpaque(false); myComponent.setFont(UIUtil.getLabelFont()); setText(DEFAULT_EMPTY_TEXT, DEFAULT_ATTRIBUTES); myIsDefaultText = true; }
public IdeNotificationArea() { Disposer.register(this, myLogAlarm); UISettings.getInstance().addUISettingsListener(new UISettingsListener() { @Override public void uiSettingsChanged(UISettings source) { updateStatus(); } }, this); new ClickListener() { @Override public boolean onClick(MouseEvent e, int clickCount) { EventLog.toggleLog(getProject()); return true; } }.installOn(this); ApplicationManager.getApplication().getMessageBus().connect().subscribe(LogModel.LOG_MODEL_CHANGED, new Runnable() { @Override public void run() { ApplicationManager.getApplication().invokeLater(new Runnable() { @Override public void run() { updateStatus(); } }); } }); }
public IdeFatalErrorsIcon(ActionListener aListener) { myListener = aListener; setBorder(BorderFactory.createEmptyBorder(0, 1, 0, 1)); new ClickListener() { @Override public boolean onClick(MouseEvent e, int clickCount) { if (myState != State.NoErrors) { myListener.actionPerformed(null); return true; } return false; } }.installOn(this); myIcon = new LayeredIcon(AllIcons.Ide.FatalError, AllIcons.Ide.FatalError_read, AllIcons.Ide.EmptyFatalError) { @Override public synchronized void paintIcon(Component c, Graphics g, int x, int y) { super.paintIcon(c, g, x, y); } @Override public synchronized void setLayerEnabled(int layer, boolean enabled) { super.setLayerEnabled(layer, enabled); } }; setIcon(myIcon); }
public JComponent createCustomComponent(Presentation presentation) { // honestly borrowed from SearchTextField final JPanel panel = new JPanel(new BorderLayout()); final JLabel label = new JLabel(myIcon); label.setOpaque(true); label.setBackground(myField.getBackground()); myField.setOpaque(true); panel.add(myField, BorderLayout.WEST); panel.add(label, BorderLayout.EAST); myField.setToolTipText(myDescription); label.setToolTipText(myDescription); final Border originalBorder; if (SystemInfo.isMac) { originalBorder = BorderFactory.createLoweredBevelBorder(); } else { originalBorder = myField.getBorder(); } panel.setBorder(new CompoundBorder(IdeBorderFactory.createEmptyBorder(4, 0, 4, 0), originalBorder)); myField.setOpaque(true); myField.setBorder(IdeBorderFactory.createEmptyBorder(0, 5, 0, 5)); new ClickListener() { @Override public boolean onClick(MouseEvent e, int clickCount) { actionPerformed(null); return true; } }.installOn(label); return panel; }
public TagsPanel(final String popupTitle) { super(new BorderLayout()); add(myTextLabel, BorderLayout.CENTER); add(myMoreLabel, BorderLayout.EAST); new ClickListener() { @Override public boolean onClick(MouseEvent e, int clickCount) { showTags(); return true; } }.installOn(myMoreLabel); myPopupTitle = popupTitle; }
private void showPopupMenuOnClick() { new ClickListener() { @Override public boolean onClick(@Nonnull MouseEvent event, int clickCount) { showPopupMenu(); return true; } }.installOn(this); }