Java 8 BasicArrowButton - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 BasicArrowButton class.

This code example shows how to use the following methods:addActionListener, setBorder
This code example shows how to use the following methods:
	public ButtonMenu(Icon icon) 
	{ 
		if (icon == null) throw new NullPointerException("No icon.");
		iconButton = new JButton(icon);
		iconButton.addActionListener(this);
		arrowButton = new BasicArrowButton(BasicArrowButton.SOUTH);
		arrowButton.addActionListener(this);
		menu = new JPopupMenu();
		setModel(new DefaultButtonModel());  //TODO: replace with ad-hoc model.
		buildGUI(); 
	} 
 
	/** 
	 * Adds the specified component to the drop-down menu. 
	 *  
	 * @param item	The component to add. Normally a <code>JMenuItem</code> or 
	 * 				a <code>JSeparator</code>. 
	 */ 
	public void addToMenu(Component item)
	{ 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:setBorder
        g2.draw(trackBounds);
    } 
 
    @Override 
    protected JButton createDecreaseButton(int orientation) {
        JButton b = new BasicArrowButton(orientation, 
                        background, foreground, foreground, foreground);
        b.setBorder(BorderFactory.createLineBorder(foreground, 1));
        return b;
    } 
 
    @Override 
    protected JButton createIncreaseButton(int orientation) {
        // TODO Auto-generated method stub 
        //return super.createIncreaseButton(orientation); 
        JButton b = new BasicArrowButton(orientation, 
                        background, foreground, foreground, foreground);
        b.setBorder(BorderFactory.createLineBorder(foreground, 1));
        return b;
    } 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
See Code Examples for Java 8 BasicArrowButton Methods: