Java Code Examples for javax.swing.ToolTipManager

The following examples show how to use javax.swing.ToolTipManager. These examples are extracted from open source projects. 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 Project: jdk8u-dev-jdk   Source File: Test6657026.java    License: GNU General Public License v2.0 6 votes vote down vote up
public static void main(String[] args) throws InterruptedException {
    ToolTipManager manager = ToolTipManager.sharedInstance();
    if (DISMISS != manager.getDismissDelay()) {
        throw new Error("unexpected dismiss delay");
    }
    if (INITIAL != manager.getInitialDelay()) {
        throw new Error("unexpected initial delay");
    }
    if (RESHOW != manager.getReshowDelay()) {
        throw new Error("unexpected reshow delay");
    }
    manager.setDismissDelay(DISMISS + 1);
    manager.setInitialDelay(INITIAL + 1);
    manager.setReshowDelay(RESHOW + 1);

    ThreadGroup group = new ThreadGroup("$$$");
    Thread thread = new Thread(group, new Test6657026());
    thread.start();
    thread.join();
}
 
Example 2
Source Project: constellation   Source File: Installer.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public void restored() {
    // Menus are lightweight, GLCanvas is heavyweight. This means that menus will appear under canvases.
    // Fix this by making menus heavyweight.
    // See http://java.sun.com/products/jfc/tsc/articles/mixing/
    // See http://java.sun.com/developer/technicalArticles/GUI/mixing_components/index.html
    // Google for jogl lightweight
    JPopupMenu.setDefaultLightWeightPopupEnabled(false);
    ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false);
}
 
Example 3
@Override
public void dispose() {
    final SlingServerTreeBuilder builder = myBuilder;
    if(builder != null) {
        Disposer.dispose(builder);
        myBuilder = null;
    }

    final Tree aTree = tree;
    if(aTree != null) {
        ToolTipManager.sharedInstance().unregisterComponent(aTree);
        for(KeyStroke keyStroke : aTree.getRegisteredKeyStrokes()) {
            aTree.unregisterKeyboardAction(keyStroke);
        }
        tree = null;
    }

    final KeyMapListener listener = myKeyMapListener;
    if(listener != null) {
        myKeyMapListener = null;
        listener.stopListen();
    }
}
 
Example 4
Source Project: openstock   Source File: ChartPanel.java    License: GNU General Public License v3.0 6 votes vote down vote up
/**
 * Handles a 'mouse entered' event. This method changes the tooltip delays
 * of ToolTipManager.sharedInstance() to the possibly different values set
 * for this chart panel.
 *
 * @param e  the mouse event.
 */
@Override
public void mouseEntered(MouseEvent e) {
    if (!this.ownToolTipDelaysActive) {
        ToolTipManager ttm = ToolTipManager.sharedInstance();

        this.originalToolTipInitialDelay = ttm.getInitialDelay();
        ttm.setInitialDelay(this.ownToolTipInitialDelay);

        this.originalToolTipReshowDelay = ttm.getReshowDelay();
        ttm.setReshowDelay(this.ownToolTipReshowDelay);

        this.originalToolTipDismissDelay = ttm.getDismissDelay();
        ttm.setDismissDelay(this.ownToolTipDismissDelay);

        this.ownToolTipDelaysActive = true;
    }
}
 
Example 5
Source Project: TencentKona-8   Source File: Test6657026.java    License: GNU General Public License v2.0 6 votes vote down vote up
public static void main(String[] args) throws InterruptedException {
    ToolTipManager manager = ToolTipManager.sharedInstance();
    if (DISMISS != manager.getDismissDelay()) {
        throw new Error("unexpected dismiss delay");
    }
    if (INITIAL != manager.getInitialDelay()) {
        throw new Error("unexpected initial delay");
    }
    if (RESHOW != manager.getReshowDelay()) {
        throw new Error("unexpected reshow delay");
    }
    manager.setDismissDelay(DISMISS + 1);
    manager.setInitialDelay(INITIAL + 1);
    manager.setReshowDelay(RESHOW + 1);

    ThreadGroup group = new ThreadGroup("$$$");
    Thread thread = new Thread(group, new Test6657026());
    thread.start();
    thread.join();
}
 
Example 6
Source Project: astor   Source File: ChartPanel.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Handles a 'mouse entered' event. This method changes the tooltip delays
 * of ToolTipManager.sharedInstance() to the possibly different values set
 * for this chart panel.
 *
 * @param e  the mouse event.
 */
public void mouseEntered(MouseEvent e) {
    if (!this.ownToolTipDelaysActive) {
        ToolTipManager ttm = ToolTipManager.sharedInstance();

        this.originalToolTipInitialDelay = ttm.getInitialDelay();
        ttm.setInitialDelay(this.ownToolTipInitialDelay);

        this.originalToolTipReshowDelay = ttm.getReshowDelay();
        ttm.setReshowDelay(this.ownToolTipReshowDelay);

        this.originalToolTipDismissDelay = ttm.getDismissDelay();
        ttm.setDismissDelay(this.ownToolTipDismissDelay);

        this.ownToolTipDelaysActive = true;
    }

    if (this.liveMouseHandler != null) {
        this.liveMouseHandler.mouseEntered(e);
    }
    Iterator iterator = this.auxiliaryMouseHandlers.iterator();
    while (iterator.hasNext()) {
        AbstractMouseHandler h = (AbstractMouseHandler) iterator.next();
        h.mouseEntered(e);
    }
}
 
Example 7
Source Project: openjdk-8   Source File: Test6657026.java    License: GNU General Public License v2.0 6 votes vote down vote up
public static void main(String[] args) throws InterruptedException {
    ToolTipManager manager = ToolTipManager.sharedInstance();
    if (DISMISS != manager.getDismissDelay()) {
        throw new Error("unexpected dismiss delay");
    }
    if (INITIAL != manager.getInitialDelay()) {
        throw new Error("unexpected initial delay");
    }
    if (RESHOW != manager.getReshowDelay()) {
        throw new Error("unexpected reshow delay");
    }
    manager.setDismissDelay(DISMISS + 1);
    manager.setInitialDelay(INITIAL + 1);
    manager.setReshowDelay(RESHOW + 1);

    ThreadGroup group = new ThreadGroup("$$$");
    Thread thread = new Thread(group, new Test6657026());
    thread.start();
    thread.join();
}
 
Example 8
private void hoverChanged() {
    String toolTipText;
    if (hover != null) {                
        JComponent jc = hover instanceof JComponent ? (JComponent)hover : null;
        Object cn = jc == null ? null : jc.getClientProperty("className");
        String name = cn == null ? "" : cn.toString();
        
        toolTipText = name.isEmpty() ? null : name;
    } else {
        toolTipText = null;
    }
    // ToolTipManager doesn't like changing the tooltip from mouseMoved().
    // This is a workaround to hide the tip when needed and prevent NPEs.
    if (toolTipText == null) ToolTipManager.sharedInstance().mousePressed(null);
    glassPane.setToolTipText(toolTipText);
    repaint();
}
 
Example 9
Source Project: scelight   Source File: IndicatorTextField.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * Creates a new {@link IndicatorTextField}.
 * 
 * @param text initial text to be set
 */
public IndicatorTextField( final String text ) {
	// Create a text field which shows the complete path in the tool tip.
	textField = new XTextField() {
		// Register this at the Tool tip manager.
		// Simply calling setToolTipText( "" ) does not work because my getToolTipText() always returns a non-null text,
		// and setToolTipText( "" ) only registers at the tool tip manager if previous tool tip is not null!
		{
			ToolTipManager.sharedInstance().registerComponent( this );
		}
		
		@Override
		public String getToolTipText() {
			return getText().isEmpty() ? null : getText();
		}
	};
	
	if ( text != null )
		textField.setText( text );
	addCenter( textField );
}
 
Example 10
Source Project: seaglass   Source File: SeaGlassDesktopIconUI.java    License: Apache License 2.0 6 votes vote down vote up
protected void installComponents() {
    if (UIManager.getBoolean("InternalFrame.useTaskBar")) {
        iconPane = new JToggleButton(frame.getTitle(), frame.getFrameIcon()) {
            public String getToolTipText() {
                return getText();
            }

            public JPopupMenu getComponentPopupMenu() {
                return frame.getComponentPopupMenu();
            }
        };
        ToolTipManager.sharedInstance().registerComponent(iconPane);
        iconPane.setFont(desktopIcon.getFont());
        iconPane.setBackground(desktopIcon.getBackground());
        iconPane.setForeground(desktopIcon.getForeground());
    } else {
        iconPane = new SeaGlassInternalFrameTitlePane(frame);
        iconPane.setName("InternalFrame.northPane");
    }
    desktopIcon.setLayout(new BorderLayout());
    desktopIcon.add(iconPane, BorderLayout.CENTER);
}
 
Example 11
Source Project: netbeans   Source File: AbstractViewTabDisplayerUI.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public void uninstallUI(JComponent c) {
    super.uninstallUI(c);
    ToolTipManager.sharedInstance().unregisterComponent(displayer);
    displayer.removePropertyChangeListener (controller);
    dataModel.removeChangeListener(controller);
    dataModel.removeComplexListDataListener(controller);
    selectionModel.removeChangeListener(controller);
    displayer.removeMouseListener(controller);
    displayer.removeMouseMotionListener(controller);
    if (controlButtons != null) {
        displayer.remove(controlButtons);
        controlButtons = null;
    }
    layoutModel = null;
    selectionModel = null;
    dataModel = null;
    controller = null;
}
 
Example 12
Source Project: astor   Source File: ChartPanel.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Handles a 'mouse exited' event. This method resets the tooltip delays of
 * ToolTipManager.sharedInstance() to their
 * original values in effect before mouseEntered()
 *
 * @param e  the mouse event.
 */
public void mouseExited(MouseEvent e) {
    if (this.ownToolTipDelaysActive) {
        // restore original tooltip dealys
        ToolTipManager ttm = ToolTipManager.sharedInstance();
        ttm.setInitialDelay(this.originalToolTipInitialDelay);
        ttm.setReshowDelay(this.originalToolTipReshowDelay);
        ttm.setDismissDelay(this.originalToolTipDismissDelay);
        this.ownToolTipDelaysActive = false;
    }

    if (this.liveMouseHandler != null) {
        this.liveMouseHandler.mouseExited(e);
    }
    Iterator iterator = this.auxiliaryMouseHandlers.iterator();
    while (iterator.hasNext()) {
        AbstractMouseHandler h = (AbstractMouseHandler) iterator.next();
        h.mouseExited(e);
    }
}
 
Example 13
public static void main(String[] args) throws InterruptedException {
    ToolTipManager manager = ToolTipManager.sharedInstance();
    if (DISMISS != manager.getDismissDelay()) {
        throw new Error("unexpected dismiss delay");
    }
    if (INITIAL != manager.getInitialDelay()) {
        throw new Error("unexpected initial delay");
    }
    if (RESHOW != manager.getReshowDelay()) {
        throw new Error("unexpected reshow delay");
    }
    manager.setDismissDelay(DISMISS + 1);
    manager.setInitialDelay(INITIAL + 1);
    manager.setReshowDelay(RESHOW + 1);

    ThreadGroup group = new ThreadGroup("$$$");
    Thread thread = new Thread(group, new Test6657026());
    thread.start();
    thread.join();
}
 
Example 14
Source Project: jdk8u-jdk   Source File: Test6657026.java    License: GNU General Public License v2.0 6 votes vote down vote up
public static void main(String[] args) throws InterruptedException {
    ToolTipManager manager = ToolTipManager.sharedInstance();
    if (DISMISS != manager.getDismissDelay()) {
        throw new Error("unexpected dismiss delay");
    }
    if (INITIAL != manager.getInitialDelay()) {
        throw new Error("unexpected initial delay");
    }
    if (RESHOW != manager.getReshowDelay()) {
        throw new Error("unexpected reshow delay");
    }
    manager.setDismissDelay(DISMISS + 1);
    manager.setInitialDelay(INITIAL + 1);
    manager.setReshowDelay(RESHOW + 1);

    ThreadGroup group = new ThreadGroup("$$$");
    Thread thread = new Thread(group, new Test6657026());
    thread.start();
    thread.join();
}
 
Example 15
/**
 * Init the component
 */
private void init() {
	if (!Env.INSTANCE.isOpenGLAvailable()) {
		LOGGER.warn("No graphic card that supports required OpenGL features has been detected. The 3D map will be not be available");
	}
	ToolTipManager.sharedInstance().setInitialDelay(0);
	// init panels
	_statusPanel = new StatusPanel(_services);
	_replayPanel = new ReplayPanel(_services, _statusPanel);
	_controlPanel = new ControlPanel(_services, this, _replayPanel, Env.INSTANCE.isIs3dMap(), Env.INSTANCE.getMode());

	_split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
	_rightSplit = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
	_rightPanel = new JPanel(new BorderLayout());
	_rightPanel.add(_rightSplit, BorderLayout.CENTER);
	_rightPanel.add(_statusPanel, BorderLayout.SOUTH);
	_split.setRightComponent(_rightPanel);
	createRightView();
	createMap(false);
	add(_split, BorderLayout.CENTER);

	// add header
	add(_controlPanel, BorderLayout.NORTH);
	resizeSplit();
}
 
Example 16
Source Project: hottub   Source File: Test6657026.java    License: GNU General Public License v2.0 6 votes vote down vote up
public static void main(String[] args) throws InterruptedException {
    ToolTipManager manager = ToolTipManager.sharedInstance();
    if (DISMISS != manager.getDismissDelay()) {
        throw new Error("unexpected dismiss delay");
    }
    if (INITIAL != manager.getInitialDelay()) {
        throw new Error("unexpected initial delay");
    }
    if (RESHOW != manager.getReshowDelay()) {
        throw new Error("unexpected reshow delay");
    }
    manager.setDismissDelay(DISMISS + 1);
    manager.setInitialDelay(INITIAL + 1);
    manager.setReshowDelay(RESHOW + 1);

    ThreadGroup group = new ThreadGroup("$$$");
    Thread thread = new Thread(group, new Test6657026());
    thread.start();
    thread.join();
}
 
Example 17
Source Project: openjdk-8-source   Source File: Test6657026.java    License: GNU General Public License v2.0 6 votes vote down vote up
public static void main(String[] args) throws InterruptedException {
    ToolTipManager manager = ToolTipManager.sharedInstance();
    if (DISMISS != manager.getDismissDelay()) {
        throw new Error("unexpected dismiss delay");
    }
    if (INITIAL != manager.getInitialDelay()) {
        throw new Error("unexpected initial delay");
    }
    if (RESHOW != manager.getReshowDelay()) {
        throw new Error("unexpected reshow delay");
    }
    manager.setDismissDelay(DISMISS + 1);
    manager.setInitialDelay(INITIAL + 1);
    manager.setReshowDelay(RESHOW + 1);

    ThreadGroup group = new ThreadGroup("$$$");
    Thread thread = new Thread(group, new Test6657026());
    thread.start();
    thread.join();
}
 
Example 18
Source Project: constellation   Source File: NamedSelectionTopComponent.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Constructs a new <code>NamedSelectionTopComponent</code>.
 */
public NamedSelectionTopComponent() {
    initComponents();

    setName(Bundle.CTL_NamedSelectionTopComponent());
    setToolTipText(Bundle.HINT_NamedSelectionTopComponent());

    // Create label and container to show user when no active graph selected:
    panelNoGraph.setLayout(new BorderLayout());
    panelNoGraph.setName("panelNoGraph");
    lblNoGraph.setBackground(Color.WHITE);
    lblNoGraph.setForeground(Color.LIGHT_GRAY);
    lblNoGraph.setOpaque(true);
    lblNoGraph.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    lblNoGraph.setVerticalAlignment(javax.swing.SwingConstants.CENTER);
    panelNoGraph.add(lblNoGraph, BorderLayout.CENTER);

    // Assign custom cell renderer:
    lstNamedSelections.setCellRenderer(new NamedSelectionCellRenderer());

    // Assign mouse and keyboard listeners:
    lstNamedSelections.addMouseListener(mouseListener);
    lstNamedSelections.addKeyListener(keyListener);

    // Context menu (popupmenu):
    lstNamedSelections.setComponentPopupMenu(popContext);

    // Register the list of selections for tooltips:
    ToolTipManager.sharedInstance().registerComponent(lstNamedSelections);

    // Set the list model to the list:
    final NamedSelectionListModel listModel = new NamedSelectionListModel();
    lstNamedSelections.setModel(listModel);

    // Start with nothing visible:
    toggleUI(false);
}
 
Example 19
Source Project: openstock   Source File: ChartPanel.java    License: GNU General Public License v3.0 5 votes vote down vote up
/**
 * Handles a 'mouse exited' event. This method resets the tooltip delays of
 * ToolTipManager.sharedInstance() to their
 * original values in effect before mouseEntered()
 *
 * @param e  the mouse event.
 */
@Override
public void mouseExited(MouseEvent e) {
    if (this.ownToolTipDelaysActive) {
        // restore original tooltip dealys
        ToolTipManager ttm = ToolTipManager.sharedInstance();
        ttm.setInitialDelay(this.originalToolTipInitialDelay);
        ttm.setReshowDelay(this.originalToolTipReshowDelay);
        ttm.setDismissDelay(this.originalToolTipDismissDelay);
        this.ownToolTipDelaysActive = false;
    }
}
 
Example 20
private void configurePlantOverview(PlantOverviewApplicationConfiguration configuration) {
  Locale.setDefault(Locale.forLanguageTag(configuration.locale()));

  try {
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
  }
  catch (ClassNotFoundException | InstantiationException | IllegalAccessException
             | UnsupportedLookAndFeelException ex) {
    LOG.warn("Could not set look-and-feel", ex);
  }
  // Show tooltips for 30 seconds (Default: 4 sec)
  ToolTipManager.sharedInstance().setDismissDelay(30 * 1000);
}
 
Example 21
Source Project: scelight   Source File: Link.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Creates a new {@link Link} which forwards mouse click events to the specified {@link Consumer} and opens the specified URL in the user's default browser
 * when clicked.
 * 
 * @param text text of the link
 * @param url {@link URL} to be opened when clicked
 * @param consumer consumer to be called when clicked
 */
public Link( final String text, final URL url, final Consumer< MouseEvent > consumer ) {
	setText( text );
	setUrl( url );
	
	this.consumer = consumer;
	
	setCursor( Cursor.getPredefinedCursor( Cursor.HAND_CURSOR ) );
	
	addMouseListener( new MouseAdapter() {
		@Override
		public void mousePressed( final MouseEvent event ) {
			if ( !isEnabled() )
				return;
			
			// Note: Link.this.consumer and Link.this.url is used
			// because these can be changed later (so we definitely don't want to refer to the local variable here!)
			if ( Link.this.consumer != null )
				Link.this.consumer.consume( event );
			if ( Link.this.url != null )
				LEnv.UTILS_IMPL.get().showURLInBrowser( Link.this.url );
		}
	} );
	
	// Register this at the Tool tip manager.
	// Simply calling setToolTipText( "" ) does not work because my getToolTipText() always returns a non-null text,
	// and setToolTipText( "" ) only registers at the tool tip manager if previous tool tip is not null!
	ToolTipManager.sharedInstance().registerComponent( this );
}
 
Example 22
Source Project: blog-codes   Source File: mxGraphComponent.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * 
 * @param enabled
 */
public void setToolTips(boolean enabled)
{
	if (enabled)
	{
		ToolTipManager.sharedInstance().registerComponent(graphControl);
	}
	else
	{
		ToolTipManager.sharedInstance().unregisterComponent(graphControl);
	}
}
 
Example 23
Source Project: bigtable-sql   Source File: ObjectTree.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Component has been added to its parent.
 */
public void addNotify()
{
	super.addNotify();
	// Register so that we can display different tooltips depending
	// which entry in list mouse is over.
	ToolTipManager.sharedInstance().registerComponent(this);
}
 
Example 24
Source Project: dragonwell8_jdk   Source File: Test6657026.java    License: GNU General Public License v2.0 5 votes vote down vote up
public void run() {
    SunToolkit.createNewAppContext();
    ToolTipManager manager = ToolTipManager.sharedInstance();
    if (DISMISS != manager.getDismissDelay()) {
        throw new Error("shared dismiss delay");
    }
    if (INITIAL != manager.getInitialDelay()) {
        throw new Error("shared initial delay");
    }
    if (RESHOW != manager.getReshowDelay()) {
        throw new Error("shared reshow delay");
    }
}
 
Example 25
Source Project: SproutLife   Source File: PanelController.java    License: MIT License 5 votes vote down vote up
private void initComponents() {
    ToolTipManager.sharedInstance().setInitialDelay(0);
    gameFrame.setVisible(true);
    getGameToolbar().getZoomSlider().setValue(-4);
    getBoardSizeHandler().updateZoomValue(-4);
    getBoardSizeHandler().updateBoardSizeFromImageSize(getScrollPanel().getViewportSize());
    getImageManager().setBackgroundColor(new Color(160,160,160));

    initSeedTypeComboBox();

    initStatsPanel();

    loadTipText();               
}
 
Example 26
Source Project: visualvm   Source File: GraphPanel.java    License: GNU General Public License v2.0 5 votes vote down vote up
private void updateTooltipText(List<ItemSelection> selectedItems) {
    if (!isTooltipShowing()) return;

    if (selectedItems.isEmpty()) {
        chart.setToolTipText(NO_DATA_TOOLTIP);
    } else {
        chart.setToolTipText(getTooltipText(selectedItems));
    }

    // A MouseEvent needs to be passed to the ToolTipManager to
    // immediately update the displayed tooltip
    MouseEvent e = new MouseEvent(chart, 0, 0, 0, mouseX, mouseY, 0, false);
    ToolTipManager.sharedInstance().mouseMoved(e);
}
 
Example 27
Source Project: jdk8u60   Source File: Test6657026.java    License: GNU General Public License v2.0 5 votes vote down vote up
public void run() {
    SunToolkit.createNewAppContext();
    ToolTipManager manager = ToolTipManager.sharedInstance();
    if (DISMISS != manager.getDismissDelay()) {
        throw new Error("shared dismiss delay");
    }
    if (INITIAL != manager.getInitialDelay()) {
        throw new Error("shared initial delay");
    }
    if (RESHOW != manager.getReshowDelay()) {
        throw new Error("shared reshow delay");
    }
}
 
Example 28
Source Project: opt4j   Source File: DefaultModulesPanel.java    License: MIT License 5 votes vote down vote up
@Override
public void startup() {

	tree = new MyTree(root);
	tree.setToggleClickCount(1000); // don't expand on double click hack
	tree.addMouseListener(mouseListener);
	tree.setCellRenderer(new TreeCellRenderer());
	tree.setSelectionModel(null);

	ToolTipManager.sharedInstance().registerComponent(tree);

	JScrollPane scroll = new JScrollPane(tree, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
			ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);

	setLayout(new BorderLayout());
	add(scroll, BorderLayout.CENTER);

	Thread thread = new Thread() {
		@Override
		public void run() {
			try {
				populateTree();
			} catch (RejectedExecutionException e) {
			}
		}
	};
	thread.setPriority(Thread.MIN_PRIORITY);
	thread.start();
}
 
Example 29
Source Project: SIMVA-SoS   Source File: ChartPanel.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Switches the display of tooltips for the panel on or off.  Note that
 * tooltips can only be displayed if the chart has been configured to
 * generate tooltip items.
 *
 * @param flag  <code>true</code> to enable tooltips, <code>false</code> to
 *              disable tooltips.
 */
public void setDisplayToolTips(boolean flag) {
    if (flag) {
        ToolTipManager.sharedInstance().registerComponent(this);
    }
    else {
        ToolTipManager.sharedInstance().unregisterComponent(this);
    }
}
 
Example 30
Source Project: xyTalk-pc   Source File: ConfigPanel.java    License: GNU Affero General Public License v3.0 5 votes vote down vote up
private void initComponents()
{
    infoLabel = new JLabel("待开发...");
    button = new RCButton("设置", Colors.MAIN_COLOR, Colors.MAIN_COLOR_DARKER, Colors.MAIN_COLOR_DARKER);
    button.setPreferredSize(new Dimension(150, 35));
    ToolTipManager.sharedInstance().setDismissDelay(10000);
    button.setToolTipText("");
}