/*
* 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.
*/
/**
* A Motif L&F implementation of TabbedPaneUI.
* <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 Amy Fowler
* @author Philip Milne
*/
{
// Instance variables initialized at installation
// UI creation
return new MotifTabbedPaneUI();
}
// UI Installation/De-installation
protected void installDefaults() {
super.installDefaults();
}
protected void uninstallDefaults() {
super.uninstallDefaults();
}
// UI Rendering
int selectedIndex,
int x, int y, int w, int h) {
// Draw unbroken line if tabs are not on TOP, OR
// selected tab is not visible (SCROLL_TAB_LAYOUT)
//
g.drawLine(x, y, x+w-2, y);
} else {
// Break line to show visual connection to selected tab
x+w-2, y);
}
}
}
int selectedIndex,
int x, int y, int w, int h) {
// Draw unbroken line if tabs are not on BOTTOM, OR
// selected tab is not visible (SCROLL_TAB_LAYOUT)
//
} else {
// Break line to show visual connection to selected tab
}
}
}
int selectedIndex,
int x, int y, int w, int h) {
// Draw unbroken line if tabs are not on RIGHT, OR
// selected tab is not visible (SCROLL_TAB_LAYOUT)
//
} else {
// Break line to show visual connection to selected tab
x+w-1, y+h-2);
}
}
}
int tabPlacement, int tabIndex,
int x, int y, int w, int h,
boolean isSelected ) {
switch(tabPlacement) {
case LEFT:
break;
case RIGHT:
break;
case BOTTOM:
break;
case TOP:
default:
}
}
int tabPlacement, int tabIndex,
int x, int y, int w, int h,
boolean isSelected) {
switch(tabPlacement) {
case LEFT:
break;
case RIGHT:
g.drawLine(x, y, x+w-3, y);
break;
case BOTTOM:
g.drawLine(x, y, x, y+h-3);
break;
case TOP:
default:
}
}
boolean isSelected) {
int x, y, w, h;
switch(tabPlacement) {
case LEFT:
x = tabRect.x + 3;
y = tabRect.y + 3;
break;
case RIGHT:
x = tabRect.x + 2;
y = tabRect.y + 3;
break;
case BOTTOM:
x = tabRect.x + 3;
y = tabRect.y + 2;
break;
case TOP:
default:
x = tabRect.x + 3;
y = tabRect.y + 3;
}
g.drawRect(x, y, w, h);
}
}
return run*3;
}
// Ensure that runover lay is not more than insets
// 2 pixel offset is set from insets to each run
switch(tabPlacement) {
case LEFT:
break;
case RIGHT:
break;
case TOP:
break;
case BOTTOM:
break;
}
return tabRunOverlay;
}
}