/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* ComboBox motif look and feel
* <p> * <strong>Warning:</strong>
* Serialized objects of this class will not be compatible with
* future Swing releases. The current serialization support is appropriate
* for short term storage or RMI between applications running the same
* version of Swing. A future release of Swing will provide support for
* long term persistence.
*
* @author Arnaud Weber
*/
return new MotifComboBoxUI();
}
super.installUI(c);
public void run(){
if ( motifGetEditor() != null ) {
}
}
};
}
if ( !isMinimumSizeDirty ) {
return new Dimension( cachedMinimumSize );
}
size = getDisplaySize();
int buttonSize = iconAreaWidth();
isMinimumSizeDirty = false;
return size;
}
return new MotifComboPopup( comboBox );
}
/**
* Overriden to empty the MouseMotionListener.
*/
super( comboBox );
}
/**
* Motif combo popup should not track the mouse in the list.
*/
return new MouseMotionAdapter() {};
}
return super.createKeyListener();
}
protected InvocationKeyHandler() {
MotifComboPopup.this.super();
}
}
}
protected void installComponents() {
if ( comboBox.isEditable() ) {
addEditor();
}
}
protected void uninstallComponents() {
removeEditor();
}
Rectangle r;
} else {
}
if ( !comboBox.isEditable() ) {
r = rectangleForCurrentValue();
paintCurrentValue(g,r,hasFocus);
}
r = rectangleForArrowIcon();
if ( !comboBox.isEditable() ) {
}
else {
}
// Draw the separation
r.x -= (HORIZ_MARGIN + 2);
}
else {
}
r.width = 1;
r.x++;
}
}
Component c;
Dimension d;
}
else {
}
d = c.getPreferredSize();
}
}
else {
}
}
else {
b.x += HORIZ_MARGIN;
}
return b;
}
}
else {
}
}
public int iconAreaWidth() {
if ( comboBox.isEditable() )
else
}
public void configureEditor() {
super.configureEditor();
}
return new ComboBoxLayoutManager();
}
return editor;
}
/**
* This inner class is marked "public" due to a compiler bug.
* This class should be treated as a "protected" inner class.
* Instantiate it only within subclasses of <FooUI>.
*/
public ComboBoxLayoutManager() {
MotifComboBoxUI.this.super();
}
if ( motifGetEditor() != null ) {
cvb.x += 1;
cvb.y += 1;
}
}
}
this.lightShadow = lightShadow;
this.darkShadow = darkShadow;
}
int w = getIconWidth();
int h = getIconHeight();
g.setColor(lightShadow);
g.setColor(darkShadow);
g.setColor(lightShadow);
g.drawLine(x, y, x+1, y);
if ( dx > 0 ) {
}
g.setColor(darkShadow);
x += 1;
dx -= 2;
}
g.setColor(darkShadow);
}
public int getIconWidth() {
return 11;
}
public int getIconHeight() {
return 11;
}
}
/**
*{@inheritDoc}
*
* @since 1.6
*/
return new MotifPropertyChangeListener();
}
/**
* This class should be made "protected" in future releases.
*/
private class MotifPropertyChangeListener
extends BasicComboBoxUI.PropertyChangeHandler {
super.propertyChange(e);
if (propertyName == "enabled") {
}
}
}
}
}
}