com.alee.managers.tooltip.TooltipManager Java Examples
The following examples show how to use
com.alee.managers.tooltip.TooltipManager.
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: ChatView.java From desktopclient-java with GNU General Public License v3.0 | 6 votes |
private void onChatChange() { Chat chat = this.getCurrentChat().orElse(null); if (chat == null) return; // avatar mAvatar.setAvatarImage(chat); TooltipManager.setTooltip(mAvatar, Utils.chatTooltip(chat)); // chat titles mTitleLabel.setText(Utils.chatTitle(chat)); List<Contact> contacts = Utils.contactList(chat); mSubTitleLabel.setText(contacts.isEmpty() ? "(" + Tr.tr("No members") + ")" : chat.isGroupChat() ? Utils.displayNames(contacts, View.MAX_NAME_IN_LIST_LENGTH) : Utils.mainStatus(contacts.iterator().next(), true)); // text area boolean isMember = chat instanceof GroupChat && !((GroupChat) chat).containsMe(); mTextComposingArea.setEnabled(chat.isValid(), isMember); // send button this.updateEnabledButtons(); // encryption status mEncryptionStatus.setStatus(chat.isSendEncrypted(), chat.canSendEncrypted()); }
Example #2
Source File: HotkeyManager.java From weblaf with GNU General Public License v3.0 | 6 votes |
private static void showComponentHotkeys ( final Window window ) { final LinkedHashSet<Component> shown = new LinkedHashSet<Component> (); hotkeys.forEachData ( new BiConsumer<JComponent, HotkeyInfo> () { @Override public void accept ( final JComponent component, final HotkeyInfo hotkeyInfo ) { if ( !hotkeyInfo.isHidden () ) { final JComponent forComponent = hotkeyInfo.getForComponent (); if ( forComponent != null && !shown.contains ( forComponent ) && forComponent.isVisible () && forComponent.isShowing () && CoreSwingUtils.getWindowAncestor ( forComponent ) == window ) { final String hotkey = HotkeyManager.getComponentHotkeysString ( forComponent ); final TooltipWay displayWay = hotkeyInfo.getHotkeyDisplayWay (); TooltipManager.showOneTimeTooltip ( forComponent, null, hotkey, displayWay ); shown.add ( forComponent ); } } } } ); }
Example #3
Source File: MainWindow.java From mars-sim with GNU General Public License v3.0 | 6 votes |
/** * Increment the label of both the earth and mars clocks */ public void incrementClocks() { if (earthDateField != null && earthClock != null && earthClock.getInstant() != null) { earthDateField.setDate(new Date(earthClock.getInstant().toEpochMilli())); TooltipManager.setTooltip(earthDateField, "Earth's Timestamp", TooltipWay.up); // LocalDateTime ldt = LocalDateTime.ofInstant(earthClock.getInstant(), ZoneId.of("UTC")); // ZonedDateTime zdt = ldt.atZone(ZoneId.of("UTC")); // Date date = Date.from(LocalDateTime.ofInstant(earthClock.getInstant(), ZoneId.of("UTC")).atZone(ZoneId.of("UTC")).toInstant()); // earthDateField.setDate(Date.from(LocalDateTime.ofInstant(earthClock.getInstant(), ZoneId.of("UTC")).atZone(ZoneId.of("UTC")).toInstant())); } // if (marsTimeLabel != null && marsClock != null) { // marsTimeLabel.setText(WHITESPACES + marsClock.getTrucatedDateTimeStamp() + WHITESPACES); // } if (marsTimeTF != null && marsClock != null) { marsTimeTF.setText(WHITESPACES + marsClock.getTrucatedDateTimeStamp() + UMST); } }
Example #4
Source File: ComponentUtils.java From desktopclient-java with GNU General Public License v3.0 | 5 votes |
private void changeImage(BufferedImage image) { mImage = image; mImageChanged = true; this.setImageOrDefault(image); this.onImageChange(Optional.ofNullable(image)); TooltipManager.setTooltip(this, this.tooltipText()); }
Example #5
Source File: ComponentUtils.java From desktopclient-java with GNU General Public License v3.0 | 5 votes |
ToggleButton(Icon icon, String tooltip) { super(icon); TooltipManager.addTooltip(this, tooltip); this.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { //if (mPopup == null || !mPopup.isShowing()) ToggleButton.this.showPopupPanel(); } }); }
Example #6
Source File: TimeWindow.java From mars-sim with GNU General Public License v3.0 | 5 votes |
/** * Set and update the season labels */ public void setSeason() { String northernSeason = marsTime.getSeason(MarsClock.NORTHERN_HEMISPHERE); String southernSeason = marsTime.getSeason(MarsClock.SOUTHERN_HEMISPHERE); if (!northernSeasonCache.equals(northernSeason)) { northernSeasonCache = northernSeason; if (marsTime.getSeason(MarsClock.NORTHERN_HEMISPHERE) != null && northernSeasonLabel != null) { northernSeasonLabel.setText(Msg.getString("TimeWindow.northernHemisphere", //$NON-NLS-1$ northernSeason)); } northernSeasonTip = getSeasonTip(northernSeason); TooltipManager.setTooltip(northernSeasonLabel, northernSeasonTip, TooltipWay.down); } if (!southernSeasonCache.equals(southernSeason)) { southernSeasonCache = southernSeason; if (marsTime.getSeason(MarsClock.SOUTHERN_HEMISPHERE) != null) { southernSeasonLabel.setText(Msg.getString("TimeWindow.southernHemisphere", //$NON-NLS-1$ southernSeason)); } southernSeasonTip = getSeasonTip(southernSeason); TooltipManager.setTooltip(southernSeasonLabel, southernSeasonTip, TooltipWay.down); } }
Example #7
Source File: WebMenuBar.java From weblaf with GNU General Public License v3.0 | 4 votes |
@Override public WebCustomTooltip addToolTip ( final String tooltip, final TooltipWay tooltipWay ) { return TooltipManager.addTooltip ( this, tooltip, tooltipWay ); }
Example #8
Source File: WebFormattedTextField.java From weblaf with GNU General Public License v3.0 | 4 votes |
@Override public WebCustomTooltip setToolTip ( final JComponent tooltip, final int delay ) { return TooltipManager.setTooltip ( this, tooltip, delay ); }
Example #9
Source File: WebToggleButton.java From weblaf with GNU General Public License v3.0 | 4 votes |
@Override public WebCustomTooltip addToolTip ( final JComponent tooltip, final int delay ) { return TooltipManager.addTooltip ( this, tooltip, delay ); }
Example #10
Source File: WebComponent.java From weblaf with GNU General Public License v3.0 | 4 votes |
@Override public WebCustomTooltip addToolTip ( final Icon icon, final String tooltip, final TooltipWay tooltipWay, final int delay ) { return TooltipManager.addTooltip ( this, icon, tooltip, tooltipWay, delay ); }
Example #11
Source File: WebLabel.java From weblaf with GNU General Public License v3.0 | 4 votes |
@Override public WebCustomTooltip setToolTip ( final Icon icon, final String tooltip ) { return TooltipManager.setTooltip ( this, icon, tooltip ); }
Example #12
Source File: WebToggleButton.java From weblaf with GNU General Public License v3.0 | 4 votes |
@Override public WebCustomTooltip addToolTip ( final JComponent tooltip, final TooltipWay tooltipWay, final int delay ) { return TooltipManager.addTooltip ( this, tooltip, tooltipWay, delay ); }
Example #13
Source File: WebSplitButton.java From weblaf with GNU General Public License v3.0 | 4 votes |
@Override public WebCustomTooltip addToolTip ( final JComponent tooltip, final int delay ) { return TooltipManager.addTooltip ( this, tooltip, delay ); }
Example #14
Source File: WebLabel.java From weblaf with GNU General Public License v3.0 | 4 votes |
@Override public WebCustomTooltip addToolTip ( final JComponent tooltip, final TooltipWay tooltipWay, final int delay ) { return TooltipManager.addTooltip ( this, tooltip, tooltipWay, delay ); }
Example #15
Source File: WebCheckBox.java From weblaf with GNU General Public License v3.0 | 4 votes |
@Override public void removeToolTip ( final WebCustomTooltip tooltip ) { TooltipManager.removeTooltip ( this, tooltip ); }
Example #16
Source File: WebSplitButton.java From weblaf with GNU General Public License v3.0 | 4 votes |
@Override public void removeToolTip ( final WebCustomTooltip tooltip ) { TooltipManager.removeTooltip ( this, tooltip ); }
Example #17
Source File: WebProgressBar.java From weblaf with GNU General Public License v3.0 | 4 votes |
@Override public WebCustomTooltip addToolTip ( final JComponent tooltip ) { return TooltipManager.addTooltip ( this, tooltip ); }
Example #18
Source File: WebButton.java From weblaf with GNU General Public License v3.0 | 4 votes |
@Override public WebCustomTooltip addToolTip ( final Icon icon, final String tooltip ) { return TooltipManager.addTooltip ( this, icon, tooltip ); }
Example #19
Source File: WebPanel.java From weblaf with GNU General Public License v3.0 | 4 votes |
@Override public WebCustomTooltip setToolTip ( final String tooltip, final TooltipWay tooltipWay ) { return TooltipManager.setTooltip ( this, tooltip, tooltipWay ); }
Example #20
Source File: WebToolBar.java From weblaf with GNU General Public License v3.0 | 4 votes |
@Override public WebCustomTooltip setToolTip ( final JComponent tooltip, final TooltipWay tooltipWay ) { return TooltipManager.setTooltip ( this, tooltip, tooltipWay ); }
Example #21
Source File: WebProgressBar.java From weblaf with GNU General Public License v3.0 | 4 votes |
@Override public void removeToolTips ( final List<WebCustomTooltip> tooltips ) { TooltipManager.removeTooltips ( this, tooltips ); }
Example #22
Source File: WebLabel.java From weblaf with GNU General Public License v3.0 | 4 votes |
@Override public WebCustomTooltip addToolTip ( final String tooltip ) { return TooltipManager.addTooltip ( this, tooltip ); }
Example #23
Source File: WebPanel.java From weblaf with GNU General Public License v3.0 | 4 votes |
@Override public WebCustomTooltip setToolTip ( final String tooltip, final TooltipWay tooltipWay, final int delay ) { return TooltipManager.setTooltip ( this, tooltip, tooltipWay, delay ); }
Example #24
Source File: WebTristateCheckBox.java From weblaf with GNU General Public License v3.0 | 4 votes |
@Override public void removeToolTips () { TooltipManager.removeTooltips ( this ); }
Example #25
Source File: WebToolBar.java From weblaf with GNU General Public License v3.0 | 4 votes |
@Override public WebCustomTooltip setToolTip ( final String tooltip ) { return TooltipManager.setTooltip ( this, tooltip ); }
Example #26
Source File: WebPasswordField.java From weblaf with GNU General Public License v3.0 | 4 votes |
@Override public WebCustomTooltip addToolTip ( final Icon icon, final String tooltip ) { return TooltipManager.addTooltip ( this, icon, tooltip ); }
Example #27
Source File: WebTristateCheckBox.java From weblaf with GNU General Public License v3.0 | 4 votes |
@Override public WebCustomTooltip addToolTip ( final JComponent tooltip, final TooltipWay tooltipWay ) { return TooltipManager.addTooltip ( this, tooltip, tooltipWay ); }
Example #28
Source File: WebStyledLabel.java From weblaf with GNU General Public License v3.0 | 4 votes |
@Override public WebCustomTooltip addToolTip ( final String tooltip, final TooltipWay tooltipWay, final int delay ) { return TooltipManager.addTooltip ( this, tooltip, tooltipWay, delay ); }
Example #29
Source File: WebTristateCheckBox.java From weblaf with GNU General Public License v3.0 | 4 votes |
@Override public WebCustomTooltip addToolTip ( final JComponent tooltip ) { return TooltipManager.addTooltip ( this, tooltip ); }
Example #30
Source File: WebRadioButton.java From weblaf with GNU General Public License v3.0 | 4 votes |
@Override public WebCustomTooltip setToolTip ( final String tooltip ) { return TooltipManager.setTooltip ( this, tooltip ); }