/*
* 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.
*/
/**
* Factory object that can vend Icons appropriate for the basic L & F.
* <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
*/
public class MotifBorders {
private boolean isRaised;
this.darkShadow = darkShadow;
this.lightShadow = lightShadow;
}
}
return insets;
}
return true;
}
}
}
if (c.hasFocus()) {
} else {
}
}
return insets;
}
}
this.darkShadow = darkShadow;
}
boolean isPressed = false;
boolean hasFocus = false;
boolean canBeDefault = false;
boolean isDefault = false;
if (c instanceof AbstractButton) {
AbstractButton b = (AbstractButton)c;
(b.isFocusPainted() && b.hasFocus());
if (b instanceof JButton) {
}
}
int bx1 = x+1;
int by1 = y+1;
int bx2 = x+w-2;
int by2 = y+h-2;
if (canBeDefault) {
if (isDefault) {
}
bx1 +=6;
by1 += 6;
bx2 -= 6;
by2 -= 6;
}
if (hasFocus) {
if (isDefault) {
} else {
}
}
}
return insets;
}
}
}
if (c instanceof AbstractButton) {
AbstractButton b = (AbstractButton)c;
} else {
false, b.isFocusPainted() && b.hasFocus(),
}
} else {
}
}
return insets;
}
}
}
if (!(c instanceof JMenuBar)) {
return;
}
if (menuBar.isBorderPainted() == true) {
// this draws the MenuBar border
}
}
return insets;
}
}
// The width of the border
/** Constructs an FrameBorder for the JComponent <b>comp</b>.
*/
}
/** Sets the FrameBorder's JComponent.
*/
}
/** Returns the FrameBorder's JComponent.
* @see #setComponent
*/
return jcomp;
}
return frameHighlight;
}
return frameColor;
}
return frameShadow;
}
return newInsets;
}
/** Draws the FrameBorder's top border.
*/
return false;
}
// Draw frame
g.setColor(frameColor);
// Draw highlights
// Draw shadows
g.setColor(frameShadow);
return true;
}
/** Draws the FrameBorder's left border.
*/
return false;
}
int startY = BORDER_SIZE;
g.setColor(frameColor);
g.setColor(frameShadow);
return true;
}
/** Draws the FrameBorder's right border.
*/
return false;
}
int startY = BORDER_SIZE;
g.setColor(frameColor);
g.setColor(frameShadow);
return true;
}
/** Draws the FrameBorder's bottom border.
*/
int marginHeight, startY;
return false;
}
g.setColor(frameShadow);
g.setColor(frameColor);
return true;
}
// Returns true if the associated component has focus.
protected boolean isActiveFrame() {
}
/** Draws the FrameBorder in the given Rect. Calls
* <b>drawTitleBar</b>, <b>drawLeftBorder</b>, <b>drawRightBorder</b> and
* <b>drawBottomBorder</b>.
*/
if (isActiveFrame()) {
} else {
}
}
}
// The size of the bounding box for Motif frame corners.
/** Constructs an InternalFrameBorder for the InternalFrame
* <b>aFrame</b>.
*/
super(aFrame);
}
/** Sets the InternalFrameBorder's InternalFrame.
*/
}
/** Returns the InternalFrameBorder's InternalFrame.
* @see #setFrame
*/
return frame;
}
/** Returns the width of the InternalFrameBorder's resize controls,
* appearing along the InternalFrameBorder's bottom border. Clicking
* and dragging within these controls lets the user change both the
* InternalFrame's width and height, while dragging between the controls
* constrains resizing to just the vertical dimension. Override this
* method if you implement your own bottom border painting and use a
* resize control with a different size.
*/
public int resizePartWidth() {
if (!frame.isResizable()) {
return 0;
}
return FrameBorder.BORDER_SIZE;
}
/** Draws the InternalFrameBorder's top border.
*/
frame.isResizable()) {
g.setColor(getFrameShadow());
g.setColor(getFrameHighlight());
return true;
}
return false;
}
/** Draws the InternalFrameBorder's left border.
*/
frame.isResizable()) {
g.setColor(getFrameHighlight());
int topY = y + CORNER_SIZE;
g.setColor(getFrameShadow());
return true;
}
return false;
}
/** Draws the InternalFrameBorder's right border.
*/
frame.isResizable()) {
g.setColor(getFrameHighlight());
int topY = y + CORNER_SIZE;
g.setColor(getFrameShadow());
return true;
}
return false;
}
/** Draws the InternalFrameBorder's bottom border.
*/
frame.isResizable()) {
g.setColor(getFrameShadow());
g.setColor(getFrameHighlight());
return true;
}
return false;
}
// Returns true if the associated internal frame has focus.
protected boolean isActiveFrame() {
return frame.isSelected();
}
}
g.translate(x, y);
if (isPressed) {
if (hasFocus){
}
} else {
if (hasFocus) {
} else {
}
g.translate(-x, -y);
}
}
// Space between the border and text
// Space for the separator under the title
/**
* Creates a MotifPopupMenuBorder instance
*
*/
public MotifPopupMenuBorder(
this.background = bgColor;
this.foreground = fgColor;
this.shadowColor = shadow;
this.highlightColor = highlight;
}
/**
* Paints the border for the specified component with the
* specified position and size.
* @param c the component for which this border is being painted
* @param g the paint graphics
* @param x the x position of the painted border
* @param y the y position of the painted border
* @param width the width of the painted border
* @param height the height of the painted border
*/
if (!(c instanceof JPopupMenu)) {
return;
}
return;
}
title);
g.setColor(background);
g.setColor(foreground);
}
/**
* Reinitialize the insets parameter with this Border's current Insets.
* @param c the component for which this border insets value applies
* @param insets the object to be reinitialized
*/
if (!(c instanceof JPopupMenu)) {
return insets;
}
int descent = 0;
int ascent = 16;
return insets;
}
}
return insets;
}
}
}