/*
* 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.
*/
/**
* Metal's split pane divider
* <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. As of 1.4, support for long term storage
* of all JavaBeans<sup><font size="-2">TM</font></sup>
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*
* @author Steve Wilson
* @author Ralph kar
*/
{
"SplitPane.dividerFocusColor");
super(ui);
}
}
else {
g.setColor(controlColor);
}
}
super.paint(g);
}
/**
* Creates and return an instance of JButton that can be used to
* collapse the left component in the metal split pane.
*/
// Sprite buffer for the arrow image of the left button
{0, 0, 2, 1, 1, 1, 0, 0, 0},
{0, 2, 1, 1, 1, 1, 1, 0, 0},
{2, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 3, 3, 3, 3, 3, 3, 3, 3}};
}
int oneTouchSize = getOneTouchSizeFromSuper();
int orientation = getOrientationFromSuper();
// Initialize the color array
this.getBackground(),
// Fill the background first ...
g.setColor(this.getBackground());
if (isOpaque()) {
this.getHeight());
}
// ... then draw the arrow.
// Adjust color mapping for pressed button state
}
// Draw the image for a vertical split
for (int j=1; j<blockSize; j++) {
continue;
}
else {
g.setColor(
}
g.drawLine(i, j, i, j);
}
}
}
else {
// Draw the image for a horizontal split
// by simply swaping the i and j axis.
// Except the drawLine() call this code is
// identical to the code block above. This was done
// in order to remove the additional orientation
// check for each pixel.
for (int j=1; j<blockSize; j++) {
// Nothing needs
// to be drawn
continue;
}
else {
// Set the color from the
// color map
g.setColor(
}
// Draw a pixel
g.drawLine(j, i, j, i);
}
}
}
}
}
// Don't want the button to participate in focus traversable.
public boolean isFocusTraversable() {
return false;
}
};
b.setRequestFocusEnabled(false);
b.setFocusPainted(false);
b.setBorderPainted(false);
return b;
}
/**
* If necessary <code>c</code> is made opaque.
*/
}
}
/**
* Creates and return an instance of JButton that can be used to
* collapse the right component in the metal split pane.
*/
// Sprite buffer for the arrow image of the right button
{0, 1, 1, 1, 1, 1, 1, 3},
{0, 0, 1, 1, 1, 1, 3, 0},
{0, 0, 0, 1, 1, 3, 0, 0},
{0, 0, 0, 0, 3, 0, 0, 0}};
}
int oneTouchSize = getOneTouchSizeFromSuper();
int orientation = getOrientationFromSuper();
// Initialize the color array
this.getBackground(),
// Fill the background first ...
g.setColor(this.getBackground());
if (isOpaque()) {
this.getHeight());
}
// ... then draw the arrow.
// Adjust color mapping for pressed button state
}
// Draw the image for a vertical split
for (int j=1; j<blockSize; j++) {
continue;
}
else {
g.setColor(
}
g.drawLine(i, j, i, j);
}
}
}
else {
// Draw the image for a horizontal split
// by simply swaping the i and j axis.
// Except the drawLine() call this code is
// identical to the code block above. This was done
// in order to remove the additional orientation
// check for each pixel.
for (int j=1; j<blockSize; j++) {
// Nothing needs
// to be drawn
continue;
}
else {
// Set the color from the
// color map
g.setColor(
}
// Draw a pixel
g.drawLine(j, i, j, i);
}
}
}
}
}
// Don't want the button to participate in focus traversable.
public boolean isFocusTraversable() {
return false;
}
};
b.setFocusPainted(false);
b.setBorderPainted(false);
b.setRequestFocusEnabled(false);
return b;
}
/**
* Used to layout a MetalSplitPaneDivider. Layout for the divider
* <p>
* This class should be treated as a "protected" inner class.
* Instantiate it only within subclasses of MetalSplitPaneDivider.
*/
// NOTE NOTE NOTE NOTE NOTE
// This class is no longer used, the functionality has
// been rolled into BasicSplitPaneDivider.DividerLayout as a
// defaults property
int orientation = getOrientationFromSuper();
int oneTouchSize = getOneTouchSizeFromSuper();
int oneTouchOffset = getOneTouchOffsetFromSuper();
// This layout differs from the one used in BasicSplitPaneDivider.
// It does not center justify the oneTouchExpadable buttons.
// This was necessary in order to meet the spec of the Metal
// splitpane divider.
c == MetalSplitPaneDivider.this) {
if (splitPane.isOneTouchExpandable()) {
int blockSize = getDividerSize();
}
}
else {
int blockSize = getDividerSize();
}
blockSize * 2);
}
}
else {
}
}
}
}
}
}
/*
* The following methods only exist in order to be able to access protected
* members in the superclass, because these are otherwise not available
* in any inner class.
*/
int getOneTouchSizeFromSuper() {
return super.ONE_TOUCH_SIZE;
}
int getOneTouchOffsetFromSuper() {
return super.ONE_TOUCH_OFFSET;
}
int getOrientationFromSuper() {
return super.orientation;
}
return super.splitPane;
}
return super.leftButton;
}
return super.rightButton;
}
}