de.muntjak.tinylookandfeel.SpecialUIButton Maven / Gradle / Ivy
Go to download
This is the Tiny look-and-feel packaged to be distributed with the SQuirreLSQL client.
The Tiny look-and-feel is a (mostly painted) look-and-feel for Java 1.4 and higher.
The newest version!
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This file is part of the Tiny Look and Feel *
* Copyright 2003 - 2008 Hans Bickel *
* *
* For licensing information and credits, please refer to the *
* comment in file de.muntjak.tinylookandfeel.TinyLookAndFeel *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package de.muntjak.tinylookandfeel;
import javax.swing.JButton;
import javax.swing.plaf.ButtonUI;
/**
* This Button uses the given ButtonUI to paint itself. Useful if a button should have
* a different look than the standard button. It refuses to change the UI delegate of
* the button.
*/
public class SpecialUIButton extends JButton {
public SpecialUIButton(ButtonUI ui) {
this.ui = ui;
ui.installUI(this);
}
/**
* refuses to change the UI delegate. It keeps the one set in the constructor.
* @see javax.swing.AbstractButton#setUI(ButtonUI)
*/
public void setUI(ButtonUI ui) {}
}