Java Code Examples for javax.swing.JToolTip#setFont()

The following examples show how to use javax.swing.JToolTip#setFont() . 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: TooltipLabel.java    From netbeans with Apache License 2.0 5 votes vote down vote up
@Override
public JToolTip createToolTip() {
    JToolTip tooltp = new JToolTip();
    tooltp.setBackground(SystemColor.control);
    tooltp.setFont(getFont());
    tooltp.setOpaque(true);
    tooltp.setComponent(this);
    tooltp.setBorder(null);
    return tooltp;
}
 
Example 2
Source File: MultiPageComp.java    From scelight with Apache License 2.0 5 votes vote down vote up
/**
 * Create a tool tip with the same font that is used in the tree.
 */
@Override
public JToolTip createToolTip() {
 final JToolTip tt = super.createToolTip();
 tt.setFont( getFont().deriveFont(
         (float) LEnv.LAUNCHER_SETTINGS.get( LSettings.PAGE_LIST_FONT_SIZE ) ) );
 return tt;
}
 
Example 3
Source File: XLabel.java    From scelight with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a tool tip with the label's font.
 */
@Override
public JToolTip createToolTip() {
	final JToolTip tt = super.createToolTip();
	
	tt.setFont( getFont() );
	
	return tt;
}
 
Example 4
Source File: IGCheckBox2.java    From open-ig with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public JToolTip createToolTip() {
	JToolTip tip = new JToolTip();
	tip.setForeground(Color.BLACK);
	tip.setBackground(Color.YELLOW);
	tip.setFont(getFont());
	return tip;
}
 
Example 5
Source File: PLabel.java    From PolyGlot with MIT License 5 votes vote down vote up
@Override
public JToolTip createToolTip() {
    JToolTip ret = super.createToolTip();
    
    if (toolTipOverrideFont != null) {
        ret.setFont(toolTipOverrideFont);
    }
    
    return ret;
}