Update of /cvsroot/squirrel-sql/mavenize/thirdparty-non-maven/metouia/src/net/sourceforge/mlf/metouia
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv12694/thirdparty-non-maven/metouia/src/net/sourceforge/mlf/metouia
Added Files:
MetouiaButtonUI.java MetouiaToolBarUI.java
MetouiaInternalFrameUI.java MetouiaCheckBoxUI.java
MetouiaScrollButton.class MetouiaTextAreaUI.java
MetouiaCheckBoxIcon.class MetouiaLookAndFeel.class
MetouiaScrollButton.java MetouiaTableHeaderUI.java
MetouiaToggleButtonUI.class MetouiaListUI.java
MetouiaGradients.class MetouiaCheckBoxIcon.java
MetouiaButtonUI.class MetouiaToolBarUI.class
MetouiaLookAndFeel.java MetouiaMenuBarUI.java
MetouiaMenuUI.class MetouiaGradients.java
MetouiaTabbedPaneUI.java MetouiaTextAreaUI.class
MetouiaPasswordFieldUI.java MetouiaTreeUI.class
MetouiaProgressBarUI.java MetouiaTextFieldUI.class
MetouiaTabbedPaneUI.class MetouiaTreeUI.java
MetouiaProgressBarUI.class MetouiaScrollPaneUI.class
MetouiaInternalFrameTitlePane.java MetouiaMenuUI.java
MetouiaDefaultTheme.class MetouiaCheckBoxUI.class
MetouiaScrollBarUI.java MetouiaPasswordFieldUI.class
MetouiaMenuBarUI.class MetouiaTableHeaderUI.class
MetouiaInternalFrameTitlePane.class
MetouiaInternalFrameUI.class MetouiaTextFieldUI.java
MetouiaListUI.class MetouiaScrollBarUI.class
MetouiaScrollPaneUI.java MetouiaToggleButtonUI.java
MetouiaDefaultTheme.java
Log Message:
Source for project which doesn't have a source code repo. Maven central only accepts artifacts whose source is hosted in a source repo.
--- NEW FILE: MetouiaInternalFrameTitlePane.class ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: MetouiaScrollButton.class ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: MetouiaScrollBarUI.java ---
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Metouia Look And Feel: a free pluggable look and feel for java *
* http://mlf.sourceforge.net *
* (C) Copyright 2002, by Taoufik Romdhane and Contributors. *
* *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by *
* the Free Software Foundation; either version 2.1 of the License, or (at *
* your option) any later version. *
* *
* This library 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 Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. *
* *
* MetouiaScrollBarUI.java *
* Original Author: Taoufik Romdhane *
* Contributor(s): *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package net.sourceforge.mlf.metouia;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Rectangle;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JScrollBar;
import javax.swing.UIManager;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.metal.MetalScrollBarUI;
import net.sourceforge.mlf.metouia.borders.MetouiaBorderUtilities;
import net.sourceforge.mlf.metouia.borders.MetouiaDots;
/**
* This class represents the UI delegate for the JScrollBar component.
*
* @author Taoufik Romdhane
*/
public class MetouiaScrollBarUI extends MetalScrollBarUI
{
/**
* The scrollbar's highlight color.
*/
private static Color highlightColor;
/**
* The scrollbar's dark shadow color.
*/
private static Color darkShadowColor;
/**
* The thumb's shadow color.
*/
private static Color thumbShadow;
/**
* The thumb's highlight color.
*/
private static Color thumbHighlightColor;
/**
* The reference of the metouia dots used for the thumb.
*/
protected MetouiaDots dots;
/**
* The free standing property of this scrollbar UI delegate.
*/
private boolean freeStanding = false;
/**
* Installs some default values.
* Initializes the metouia dots used for the thumb.
*/
protected void installDefaults()
{
super.installDefaults();
dots = new MetouiaDots(5, 5);
}
/**
* Creates the UI delegate for the given component.
*
* @param c The component to create its UI delegate.
* @return The UI delegate for the given component.
*/
public static ComponentUI createUI(JComponent c)
{
return new MetouiaScrollBarUI();
}
/**
* Creates the decrease button of the scrollbar.
*
* @param orientation The button's orientation.
* @return The created button.
*/
protected JButton createDecreaseButton(int orientation)
{
decreaseButton =
new MetouiaScrollButton(orientation, scrollBarWidth - 0, freeStanding);
return decreaseButton;
}
/**
* Creates the increase button of the scrollbar.
*
* @param orientation The button's orientation.
* @return The created button.
*/
protected JButton createIncreaseButton(int orientation)
{
increaseButton =
new MetouiaScrollButton(orientation, scrollBarWidth, freeStanding);
return increaseButton;
}
/**
* Paints the scrollbar's thumb.
*
* @param g The graphics context to use.
* @param c The component to paint.
* @param thumbBounds The track bounds.
*/
protected void paintThumb(Graphics g, JComponent c, Rectangle thumbBounds)
{
boolean leftToRight = c.getComponentOrientation().isLeftToRight();
g.translate(thumbBounds.x, thumbBounds.y);
if (scrollbar.getOrientation() == JScrollBar.VERTICAL)
{
if (!freeStanding)
{
if (!leftToRight)
{
thumbBounds.width += 1;
g.translate(-1, 0);
}
else
{
thumbBounds.width += 2;
}
}
g.setColor(thumbShadow);
g.drawRect(0, 0, thumbBounds.width - 2, thumbBounds.height - 1);
dots.setDotsArea(thumbBounds.width - 6, thumbBounds.height - 7);
dots.paintIcon(c, g, 4, 4);
if (!freeStanding)
{
if (!leftToRight)
{
thumbBounds.width -= 1;
g.translate(1, 0);
}
else
{
thumbBounds.width -= 2;
}
}
}
else // HORIZONTAL
{
if (!freeStanding)
{
thumbBounds.height += 2;
}
g.setColor(thumbHighlightColor);
g.setColor(thumbShadow);
g.drawRect(0, 0, thumbBounds.width - 1, thumbBounds.height - 2);
dots.setDotsArea(thumbBounds.width - 7, thumbBounds.height - 6);
dots.paintIcon(c, g, 4, 5);
if (!freeStanding)
{
thumbBounds.height -= 2;
}
}
g.translate(-thumbBounds.x, -thumbBounds.y);
// colors for the reflection gradient
Color colorReflection = MetouiaLookAndFeel.getGradientReflection();
Color colorReflectionFaded =
MetouiaLookAndFeel.getGradientTranslucentReflection();
// colors for the shadow gradient
Color colorShadow = MetouiaLookAndFeel.getGradientShadow();
Color colorShadowFaded = MetouiaLookAndFeel.getGradientTranslucentShadow();
Rectangle rectReflection; // rectangle for the reflection gradient
Rectangle rectShadow; // rectangle for the shadow gradient
if (scrollbar.getOrientation() == JScrollBar.VERTICAL)
{
rectReflection = new Rectangle(thumbBounds.x + 1, thumbBounds.y + 1,
thumbBounds.width / 2, thumbBounds.height - 2);
rectShadow = new Rectangle(thumbBounds.x + thumbBounds.width / 2,
thumbBounds.y + 1, thumbBounds.width / 2 + 1, thumbBounds.height - 2);
}
else
{
rectReflection = new Rectangle(thumbBounds.x + 1, thumbBounds.y + 1,
thumbBounds.width - 2, thumbBounds.height / 2);
rectShadow = new Rectangle(thumbBounds.x + 1,
thumbBounds.y + thumbBounds.height / 2, thumbBounds.width - 2,
thumbBounds.height / 2 + 1);
}
boolean isVertical = (scrollbar.getOrientation() == JScrollBar.HORIZONTAL);
MetouiaGradients.drawGradient(g, colorReflection, colorReflectionFaded,
rectReflection, isVertical, true);
MetouiaGradients.drawGradient(g, colorShadowFaded, colorShadow,
rectShadow, isVertical, false);
}
/**
* Initializes the scrollbar color from the current theme.
*/
protected void configureScrollBarColors()
{
super.configureScrollBarColors();
highlightColor = UIManager.getColor("ScrollBar.highlight");
darkShadowColor = UIManager.getColor("ScrollBar.darkShadow");
thumbShadow = MetouiaLookAndFeel.getControlDarkShadow();
thumbHighlightColor = MetouiaLookAndFeel.getMenuBackground();
}
/**
* Paints the scrollbar's track.
*
* @param g The graphics context to use.
* @param c The component to paint.
* @param trackBounds The track bounds.
*/
protected void paintTrack(Graphics g, JComponent c, Rectangle trackBounds)
{
g.translate(trackBounds.x, trackBounds.y);
boolean leftToRight = c.getComponentOrientation().isLeftToRight();
if (scrollbar.getOrientation() == JScrollBar.VERTICAL)
{
if (!freeStanding)
{
if (!leftToRight)
{
trackBounds.width += 1;
g.translate(-1, 0);
}
else
{
trackBounds.width += 2;
}
}
if (c.isEnabled())
{
g.setColor(darkShadowColor);
g.drawLine(0, 0, 0, trackBounds.height - 1);
g.drawLine(trackBounds.width - 2, 0, trackBounds.width - 2,
trackBounds.height - 1);
g.drawLine(1, trackBounds.height - 1, trackBounds.width - 1,
trackBounds.height - 1);
g.drawLine(1, 0, trackBounds.width - 1, 0);
g.setColor(highlightColor);
g.drawLine(trackBounds.width - 1, 0, trackBounds.width - 1,
trackBounds.height - 1);
}
else
{
MetouiaBorderUtilities.drawDisabledBorder(
g, 0, 0, trackBounds.width, trackBounds.height);
}
if (!freeStanding)
{
if (!leftToRight)
{
trackBounds.width -= 1;
g.translate(1, 0);
}
else
{
trackBounds.width -= 2;
}
}
}
else // HORIZONTAL
{
if (!freeStanding)
{
trackBounds.height += 2;
}
if (c.isEnabled())
{
g.setColor(darkShadowColor);
g.drawLine(0, 0, trackBounds.width - 1, 0); // top
g.drawLine(0, 1, 0, trackBounds.height - 1); // left
g.drawLine(0, trackBounds.height - 2,
trackBounds.width - 1, trackBounds.height - 2); // bottom
g.drawLine(trackBounds.width - 1, 1,
trackBounds.width - 1, trackBounds.height - 1); // right
}
else
{
MetouiaBorderUtilities.drawDisabledBorder(
g, 0, 0, trackBounds.width, trackBounds.height);
}
if (!freeStanding)
{
trackBounds.height -= 2;
}
}
g.translate(-trackBounds.x, -trackBounds.y);
}
}
--- NEW FILE: MetouiaGradients.class ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: MetouiaTextAreaUI.class ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: MetouiaTextFieldUI.java ---
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Metouia Look And Feel: a free pluggable look and feel for java *
* http://mlf.sourceforge.net *
* (C) Copyright 2002, by Taoufik Romdhane and Contributors. *
* *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by *
* the Free Software Foundation; either version 2.1 of the License, or (at *
* your option) any later version. *
* *
* This library 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 Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. *
* *
* MetouiaTextFieldUI.java *
* Original Author: Taoufik Romdhane *
* Contributor(s): *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package net.sourceforge.mlf.metouia;
import javax.swing.plaf.basic.BasicTextFieldUI;
/**
* This class represents the UI delegate for the JTextField component.
* There is no reasonable implementaion at this timepoint!
*
* @author Taoufik Romdhane
*/
public class MetouiaTextFieldUI extends BasicTextFieldUI
{
}
--- NEW FILE: MetouiaTextFieldUI.class ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: MetouiaProgressBarUI.class ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: MetouiaTabbedPaneUI.class ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: MetouiaInternalFrameTitlePane.java ---
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Metouia Look And Feel: a free pluggable look and feel for java *
* http://mlf.sourceforge.net *
* (C) Copyright 2002, by Taoufik Romdhane and Contributors. *
* *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by *
* the Free Software Foundation; either version 2.1 of the License, or (at *
* your option) any later version. *
* *
* This library 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 Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. *
* *
* MetouiaInternalFrameTitlePane.java *
* Original Author: Taoufik Romdhane *
* Contributor(s): Christian Walker *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package net.sourceforge.mlf.metouia;
import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics;
import java.awt.LayoutManager;
import java.awt.Rectangle;
import javax.swing.Icon;
import javax.swing.JButton;
import javax.swing.JInternalFrame;
import javax.swing.UIManager;
import javax.swing.plaf.metal.MetalInternalFrameTitlePane;
import javax.swing.plaf.metal.MetalLookAndFeel;
import net.sourceforge.mlf.metouia.borders.MetouiaDots;
/**
* This class represents the title pane for the JInternalFrame components.
*
* @author Taoufik Romdhane
*/
public class MetouiaInternalFrameTitlePane extends MetalInternalFrameTitlePane
implements LayoutManager
{
/**
* The frame's title height, read from the UIDefaults table.
*/
protected int frameTitleHeight;
/**
* The buttons width, calculated at runtime.
*/
private int buttonsWidth;
/**
* The shared instance of the Metouia dots.
*/
protected MetouiaDots dots = new MetouiaDots(0, 0);
/**
* The shared instance of the Metouia dots for palette, initialized when
* needed.
*/
protected MetouiaDots paletteDots;
/**
* Installs some default values.
* Reads the internalframe title height from the ui defaults table.
*/
protected void installDefaults()
{
super.installDefaults();
frameTitleHeight = UIManager.getInt("InternalFrame.frameTitleHeight");
}
/**
* This constructor creates a title pane for the given internal frame
* instance.
*
* @param frame The internal frame that needs a title pane.
*/
public MetouiaInternalFrameTitlePane(JInternalFrame frame)
{
super(frame);
}
/**
* Paints this component.
*
* @param g The graphics context to use.
*/
public void paintComponent(Graphics g)
{
if (isPalette)
{
paintPalette(g);
return;
}
boolean leftToRight = frame.getComponentOrientation().isLeftToRight();
boolean isSelected = frame.isSelected();
int width = getWidth();
int height = getHeight();
Color background = MetalLookAndFeel.getWindowTitleInactiveBackground();
Color foreground = MetalLookAndFeel.getWindowTitleInactiveForeground();
Color darkShadow = MetalLookAndFeel.getControlDarkShadow();
g.setColor(background);
g.fillRect(0, 0, width, height);
g.setColor(darkShadow);
g.drawLine(0, height - 2, width, height - 2);
g.setColor(Color.white);
g.drawLine(0, height - 1, width, height - 1);
int titleLength = 0;
int xOffset = leftToRight ? 2 : width - 2;
String frameTitle = frame.getTitle();
Icon icon = frame.getFrameIcon();
if (icon != null)
{
if (!leftToRight)
xOffset -= icon.getIconWidth();
int iconY = ((height / 2) - (icon.getIconHeight() / 2));
icon.paintIcon(frame, g, xOffset, iconY);
xOffset += leftToRight ? icon.getIconWidth() + 2 : -2;
}
if (frameTitle != null)
{
Font f = getFont();
g.setFont(f);
FontMetrics fm = g.getFontMetrics();
titleLength = fm.stringWidth(frameTitle);
g.setColor(foreground);
int yOffset = ((height - fm.getHeight()) / 2) + fm.getAscent();
if (!leftToRight)
xOffset -= titleLength;
g.drawString(frameTitle, xOffset, yOffset);
xOffset += leftToRight ? titleLength + 2 : -2;
}
int bumpXOffset;
int bumpLength;
if (leftToRight)
{
bumpLength = width - buttonsWidth - xOffset - 2;
bumpXOffset = xOffset;
}
else
{
bumpLength = xOffset - buttonsWidth - 2;
bumpXOffset = buttonsWidth + 2;
}
int bumpYOffset = 6;
int bumpHeight = getHeight() - (2 * bumpYOffset) + 1;
dots.setDotsArea(bumpLength, bumpHeight);
if (isSelected)
{
dots.paintIcon(this, g, bumpXOffset, bumpYOffset);
}
// Paint the horizontal highlight gradient:
MetouiaGradients.drawHorizontalHighlight(g, this);
// Paint the horizontal shadow gradient:
MetouiaGradients.drawShadow(
g, new Rectangle(0, getHeight() / 2, getWidth(), getHeight() / 2 - 1),
true, false);
}
/**
* Creates the layout manager for the title pane.
*
* @return The layout manager for the title pane.
*/
protected LayoutManager createLayout()
{
return this;
}
/**
* Creates the buttons of the title pane and initilizes their actions.
*/
protected void createButtons()
{
iconButton = new JButton();
iconButton.addActionListener(iconifyAction);
iconButton.setRolloverEnabled(true);
iconButton.setContentAreaFilled(false);
maxButton = new JButton();
maxButton.addActionListener(maximizeAction);
maxButton.setRolloverEnabled(true);
maxButton.setContentAreaFilled(false);
closeButton = new JButton();
closeButton.addActionListener(closeAction);
closeButton.setRolloverEnabled(true);
closeButton.setContentAreaFilled(false);
setButtonIcons();
iconButton.getAccessibleContext().setAccessibleName(
UIManager.getString(
"InternalFrameTitlePane.iconifyButtonAccessibleName"));
maxButton.getAccessibleContext().setAccessibleName(
UIManager.getString(
"InternalFrameTitlePane.maximizeButtonAccessibleName"));
closeButton.getAccessibleContext().setAccessibleName(
UIManager.getString(
"InternalFrameTitlePane.closeButtonAccessibleName"));
}
/**
* Paints the title pane for a palette.
*
* @param g The graphics context to use.
*/
public void paintPalette(Graphics g)
{
boolean leftToRight = frame.getComponentOrientation().isLeftToRight();
int width = getWidth();
int height = getHeight();
if (paletteDots == null)
{
paletteDots
= new MetouiaDots(0, 0);
}
Color background = MetalLookAndFeel.getPrimaryControlShadow();
Color darkShadow = MetalLookAndFeel.getPrimaryControlDarkShadow();
background = MetalLookAndFeel.getWindowTitleInactiveBackground();
// foreground = MetalLookAndFeel.getWindowTitleInactiveForeground();
darkShadow = MetalLookAndFeel.getControlDarkShadow();
g.setColor(background);
g.fillRect(0, 0, width, height);
g.setColor(darkShadow);
g.drawLine(0, height - 1, width, height - 1);
int xOffset = leftToRight ? 2 : buttonsWidth + 2;
int bumpLength = width - buttonsWidth - 1;
int bumpHeight = getHeight() - 2;
paletteDots.setDotsArea(bumpLength, bumpHeight);
paletteDots.paintIcon(this, g, xOffset, 2);
// Paint the horizontal highlight gradient:
MetouiaGradients.drawHorizontalHighlight(g, this);
// Paint the horizontal shadow gradient:
MetouiaGradients.drawHorizontalShadow(g, this);
}
/**
* Adds the specified component with the specified name to the layout.
*
* @param name the component name
* @param c the component to be added
*/
public void addLayoutComponent(String name, Component c)
{
}
/**
* Removes the specified component from the layout.
*
* @param c the component to be removed
*/
public void removeLayoutComponent(Component c)
{
}
/**
* Calculates the preferred size dimensions for the specified
* panel given the components in the specified parent container.
*
* @param c the component to be laid out
*/
public Dimension preferredLayoutSize(Container c)
{
return getPreferredSize(c);
}
/**
* Gets the preferred size of the given container.
*
* @param c The container to gets its preferred size.
* @return The preferred size of the given container.
*/
public Dimension getPreferredSize(Container c)
{
return
new Dimension(
c.getSize().width,
(isPalette ? paletteTitleHeight : frameTitleHeight));
}
/**
* The minimum size of the frame.
* This is used, for example, during resizing to
* find the minimum allowable size.
* Providing at least some minimum size fixes a bug
* which breaks horizontal resizing.
* <b>Note</b>: the Motif plaf allows for a 0,0 min size,
* but we provide a reasonable minimum here.
* <b>Future</b>: calculate min size based upon contents.
*/
public Dimension getMinimumSize() {
return new Dimension(70,20);
}
/**
* Calculates the minimum size dimensions for the specified
* panel given the components in the specified parent container.
*
* @param c the component to be laid out
*/
public Dimension minimumLayoutSize(Container c)
{
return preferredLayoutSize(c);
}
/**
* Lays out the container in the specified panel.
*
* @param c the component which needs to be laid out
*/
public void layoutContainer(Container c)
{
boolean leftToRight = frame.getComponentOrientation().isLeftToRight();
int w = getWidth();
int x = leftToRight ? w : 0;
int y = 2;
int spacing;
// assumes all buttons have the same dimensions
// these dimensions include the borders
int buttonHeight = closeButton.getIcon().getIconHeight();
int buttonWidth = closeButton.getIcon().getIconWidth();
if (frame.isClosable())
{
if (isPalette)
{
spacing = 0;
x += leftToRight ? -spacing - (buttonWidth) : spacing;
closeButton.setBounds(x, y - 1, buttonWidth, getHeight() - 2);
if (!leftToRight)
x += (buttonWidth);
}
else
{
spacing = 0;
x += leftToRight ? -spacing - buttonWidth : spacing;
closeButton.setBounds(x, y, buttonWidth, buttonHeight);
if (!leftToRight)
x += buttonWidth;
}
}
if (frame.isMaximizable() && !isPalette)
{
spacing = frame.isClosable() ? 0 : 2;
x += leftToRight ? -spacing - buttonWidth : spacing;
maxButton.setBounds(x, y, buttonWidth, buttonHeight);
if (!leftToRight)
x += buttonWidth;
}
if (frame.isIconifiable() && !isPalette)
{
spacing = frame.isMaximizable() ? 0
: (frame.isClosable() ? 0 : 2);
x += leftToRight ? -spacing - buttonWidth : spacing;
iconButton.setBounds(x, y, buttonWidth, buttonHeight);
if (!leftToRight)
x += buttonWidth;
}
buttonsWidth = leftToRight ? w - x : x;
}
}
--- NEW FILE: MetouiaMenuUI.java ---
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Metouia Look And Feel: a free pluggable look and feel for java *
* http://mlf.sourceforge.net *
* (C) Copyright 2002, by Taoufik Romdhane and Contributors. *
* *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by *
* the Free Software Foundation; either version 2.1 of the License, or (at *
* your option) any later version. *
* *
* This library 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 Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. *
* *
* MetouiaMenuUI.java *
* Original Author: Taoufik Romdhane *
* Contributor(s): *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package net.sourceforge.mlf.metouia;
import java.awt.Container;
import java.awt.Graphics;
import java.awt.Rectangle;
import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicMenuUI;
/**
* This class represents the UI delegate for the JMenu component.
*
* @author Taoufik Romdhane
*/
public class MetouiaMenuUI extends BasicMenuUI
{
/**
* Creates the UI delegate for the given component.
*
* @param c The component to create its UI delegate.
* @return The UI delegate for the given component.
*/
public static ComponentUI createUI(JComponent c)
{
return new MetouiaMenuUI();
}
/**
* Paints the given component.
*
* @param g The graphics context to use.
* @param c The component to paint.
*/
public void paint(Graphics g, JComponent c)
{
super.paint(g, c);
Container parent = menuItem.getParent();
// Paint the horizontal highlight gradient:
MetouiaGradients.drawHighlight(
g, new Rectangle(0, -1, parent.getWidth(), parent.getHeight() / 2),
true, true);
// Paint the horizontal shadow gradient:
MetouiaGradients.drawShadow(
g,
new Rectangle(
0, parent.getHeight() / 2 - 1,
parent.getWidth(), parent.getHeight() / 2),
true, false);
}
}
--- NEW FILE: MetouiaListUI.class ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: MetouiaMenuBarUI.java ---
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Metouia Look And Feel: a free pluggable look and feel for java *
* http://mlf.sourceforge.net *
* (C) Copyright 2002, by Taoufik Romdhane and Contributors. *
* *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by *
* the Free Software Foundation; either version 2.1 of the License, or (at *
* your option) any later version. *
* *
* This library 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 Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. *
* *
* MetouiaMenuBarUI.java *
* Original Author: Taoufik Romdhane *
* Contributor(s): *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package net.sourceforge.mlf.metouia;
import java.awt.Graphics;
import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicMenuBarUI;
/**
* This class represents the UI delegate for the JMenuBar component.
*
* @author Taoufik Romdhane
*/
public class MetouiaMenuBarUI extends BasicMenuBarUI
{
/**
* Creates the UI delegate for the given component.
* Because in normal application there is usually only one menu bar, the UI
* delegate isn't cached here.
*
* @param c The component to create its UI delegate.
* @return The UI delegate for the given component.
*/
public static ComponentUI createUI(JComponent c)
{
return new MetouiaMenuBarUI();
}
/**
* Paints the given component.
*
* @param g The graphics context to use.
* @param c The component to paint.
*/
public void paint(Graphics g, JComponent c)
{
super.paint(g, c);
// Paint the horizontal highlight gradient:
MetouiaGradients.drawHorizontalHighlight(g, c);
// Paint the horizontal shadow gradient:
MetouiaGradients.drawHorizontalShadow(g, c);
}
}
--- NEW FILE: MetouiaScrollButton.java ---
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Metouia Look And Feel: a free pluggable look and feel for java *
* http://mlf.sourceforge.net *
* (C) Copyright 2002, by Taoufik Romdhane and Contributors. *
* *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by *
* the Free Software Foundation; either version 2.1 of the License, or (at *
* your option) any later version. *
* *
* This library 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 Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. *
* *
* MetouiaScrollButton.java *
* Original Author: Taoufik Romdhane *
* Contributor(s): *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package net.sourceforge.mlf.metouia;
import java.awt.Graphics;
import java.awt.Rectangle;
import javax.swing.plaf.metal.MetalScrollButton;
/**
* This class represents an arrow button used in scrollbars.
*
* @author Taoufik Romdhane
*/
public class MetouiaScrollButton extends MetalScrollButton
{
/**
* Creates a new scroll button with the given direction and width.
*
* @param direction The arrow direction of the button.
* @param width The button's width.
* @param freeStanding The button's state (stand alonne or in scrollbar).
*/
public MetouiaScrollButton(int direction, int width, boolean freeStanding)
{
super(direction, width, freeStanding);
}
/**
* Paints the scroll button.
*
* @param g The graphics context to use.
*/
public void paint(Graphics g)
{
super.paint(g);
int width = getWidth();
int height = getHeight();
// This is a hack! See ScrollPaneUI where the buttons borders are drawed
// on the lower right corner if exists.
if (getModel().isPressed())
{
g.setColor(MetouiaLookAndFeel.getControlShadow());
}
else
{
g.setColor(getBackground());
}
// Restitute the backround of the one border part because its already drawn.
if (getDirection() == SOUTH)
{
g.drawLine(1, height - 1, width - 1, height - 1);
}
else if (getDirection() == EAST)
{
g.drawLine(width - 1, 1, width - 1, height - 1);
}
else if (getDirection() == NORTH)
{
}
else if (getDirection() == WEST)
{
}
Rectangle reflection;
Rectangle shadow;
boolean isVertical = (getDirection() == EAST || getDirection() == WEST);
if (isVertical)
{
reflection = new Rectangle(1, 1, width - 2, height / 2);
shadow = new Rectangle(1, height / 2, width - 2, height / 2 + 1);
}
else
{
reflection = new Rectangle(1, 1, width / 2, height - 2);
shadow = new Rectangle(width / 2, 1, width / 2 + 1, height - 2);
}
// Paint the highlight gradient:
MetouiaGradients.drawHighlight(g, reflection, isVertical, true);
// Paint the shadow gradient:
MetouiaGradients.drawShadow(g, shadow, isVertical, false);
}
}
--- NEW FILE: MetouiaTextAreaUI.java ---
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Metouia Look And Feel: a free pluggable look and feel for java *
* http://mlf.sourceforge.net *
* (C) Copyright 2002, by Taoufik Romdhane and Contributors. *
* *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by *
* the Free Software Foundation; either version 2.1 of the License, or (at *
* your option) any later version. *
* *
* This library 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 Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. *
* *
* MetouiaTextAreaUI.java *
* Original Author: Taoufik Romdhane *
* Contributor(s): *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package net.sourceforge.mlf.metouia;
import javax.swing.plaf.basic.BasicTextAreaUI;
/**
* This class represents the UI delegate for the JTextArea component.
* There is no reasonable implementaion at this timepoint!
*
* @author Taoufik Romdhane
*/
public class MetouiaTextAreaUI extends BasicTextAreaUI
{
}
--- NEW FILE: MetouiaButtonUI.class ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: MetouiaTreeUI.java ---
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Metouia Look And Feel: a free pluggable look and feel for java *
* http://mlf.sourceforge.net *
* (C) Copyright 2002, by Taoufik Romdhane and Contributors. *
* *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by *
* the Free Software Foundation; either version 2.1 of the License, or (at *
* your option) any later version. *
* *
* This library 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 Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. *
* *
* MetouiaTreeUI.java *
* Original Author: Taoufik Romdhane *
* Contributor(s): *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package net.sourceforge.mlf.metouia;
import java.awt.Graphics;
import java.awt.Insets;
import java.awt.Rectangle;
import javax.swing.ImageIcon;
import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicTreeUI;
import javax.swing.tree.TreePath;
/**
* This class represents the UI delegate for the JTree component.
*
* @author Taoufik Romdhane
*/
public class MetouiaTreeUI extends BasicTreeUI
{
/**
* The expand control image.
*/
protected static ImageIcon expanded;
/**
* The collapse control image.
*/
protected static ImageIcon collapsed;
/**
* Creates the UI delegate for the given tree.
*
* @param tree The tree to create its UI delegate.
*/
public MetouiaTreeUI(JComponent tree)
{
expanded = MetouiaLookAndFeel.loadIcon("treeex.gif", this);
collapsed = MetouiaLookAndFeel.loadIcon("treecol.gif", this);
}
/**
* Creates the UI delegate for the given component.
*
* @param tree The component to create its UI delegate.
* @return The UI delegate for the given component.
*/
public static ComponentUI createUI(JComponent tree)
{
return new MetouiaTreeUI(tree);
}
/**
* Paints the expand (toggle) part of a row. The reciever should
* NOT modify <code>clipBounds</code>, or <code>insets</code>.
*
* @param g The graphics context to use.
* @param bounds The expand control bounds.
* @param isExpanded The target state of the expand control.
* @param clipBounds Unused argument.
* @param insets Unused argument.
* @param path Unused argument.
* @param row Unused argument.
* @param hasBeenExpanded Unused argument.
* @param isLeaf Unused argument.
*/
protected void paintExpandControl(Graphics g, Rectangle clipBounds,
Insets insets, Rectangle bounds, TreePath path, int row,
boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
{
if (isExpanded)
{
g.drawImage(expanded.getImage(), bounds.x - 17, bounds.y + 4, null);
}
else
{
g.drawImage(collapsed.getImage(), bounds.x - 17, bounds.y + 4, null);
}
}
}
--- NEW FILE: MetouiaPasswordFieldUI.class ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: MetouiaMenuUI.class ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: MetouiaDefaultTheme.class ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: MetouiaToggleButtonUI.class ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: MetouiaScrollPaneUI.class ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: MetouiaLookAndFeel.class ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: MetouiaCheckBoxUI.java ---
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Metouia Look And Feel: a free pluggable look and feel for java *
* http://mlf.sourceforge.net *
* (C) Copyright 2002, by Taoufik Romdhane and Contributors. *
* *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by *
* the Free Software Foundation; either version 2.1 of the License, or (at *
* your option) any later version. *
* *
* This library 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 Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. *
* *
* MetouiaCheckBoxUI.java *
* Original Author: Taoufik Romdhane *
* Contributor(s): *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package net.sourceforge.mlf.metouia;
import javax.swing.JComponent;
import javax.swing.AbstractButton;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.metal.MetalCheckBoxUI;
/**
* This class represents the UI delegate for the JCheckBox component.
*
* @author Taoufik Romdhane
*/
public class MetouiaCheckBoxUI extends MetalCheckBoxUI
{
/**
* The Cached UI delegate.
*/
private final static MetouiaCheckBoxUI checkBoxUI = new MetouiaCheckBoxUI();
/**
* Creates the UI delegate for the given component.
*
* @param c The component to create its UI delegate.
* @return The UI delegate for the given component.
*/
public static ComponentUI createUI(JComponent c)
{
return checkBoxUI;
}
/**
* Installs some default values for the given button.
* The button border is replaced by a metouia border.
*
* @param button The reference of the button to install its default values.
*/
public void installDefaults(AbstractButton button)
{
super.installDefaults(button);
icon = new MetouiaCheckBoxIcon();
}
}
--- NEW FILE: MetouiaProgressBarUI.java ---
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Metouia Look And Feel: a free pluggable look and feel for java *
* http://mlf.sourceforge.net *
* (C) Copyright 2002, by Taoufik Romdhane and Contributors. *
* *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by *
* the Free Software Foundation; either version 2.1 of the License, or (at *
* your option) any later version. *
* *
* This library 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 Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. *
* *
* MetouiaProgressBarUI.java *
* Original Author: Taoufik Romdhane *
* Contributor(s): *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package net.sourceforge.mlf.metouia;
import java.awt.Graphics;
import javax.swing.JComponent;
import javax.swing.JProgressBar;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicProgressBarUI;
/**
* This class represents the UI delegate for the JProgressBar component.
*
* @author Taoufik Romdhane
*/
public class MetouiaProgressBarUI extends BasicProgressBarUI
{
/**
* Creates the UI delegate for the given component.
*
* @param c The component to create its UI delegate.
* @return The UI delegate for the given component.
*/
public static ComponentUI createUI(JComponent c)
{
return new MetouiaProgressBarUI();
}
/**
* Paints the given component.
*
* @param g The graphics context to use.
* @param c The component to paint.
*/
public void paint(Graphics g, JComponent c)
{
super.paint(g, c);
if (((JProgressBar)c).getOrientation() == JProgressBar.HORIZONTAL)
{
// Paint the horizontal highlight gradient:
MetouiaGradients.drawHorizontalHighlight(g, c);
// Paint the horizontal shadow gradient:
MetouiaGradients.drawHorizontalShadow(g, c);
}
else
{
// Paint the vertical highlight gradient:
MetouiaGradients.drawVerticalHighlight(g, c);
// Paint the vertical shadow gradient:
MetouiaGradients.drawVerticalShadow(g, c);
}
}
}
--- NEW FILE: MetouiaCheckBoxIcon.java ---
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Metouia Look And Feel: a free pluggable look and feel for java *
* http://mlf.sourceforge.net *
* (C) Copyright 2002, by Taoufik Romdhane and Contributors. *
* *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by *
* the Free Software Foundation; either version 2.1 of the License, or (at *
* your option) any later version. *
* *
* This library 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 Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. *
* *
* MetouiaCheckBoxIcon.java *
* Original Author: Taoufik Romdhane *
* Contributor(s): Christian Walker *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package net.sourceforge.mlf.metouia;
import java.awt.Component;
import java.awt.Graphics;
import java.awt.Rectangle;
import javax.swing.plaf.metal.MetalCheckBoxIcon;
import javax.swing.plaf.metal.MetalLookAndFeel;
/**
* This class represents a check box icon.
*
* @author Taoufik Romdhane
*/
public class MetouiaCheckBoxIcon extends MetalCheckBoxIcon
{
/**
* Draws the check box icon at the specified location.
*
* @param c The component to draw on.
* @param g The graphics context.
* @param x The x coordinate of the top left corner.
* @param y The y coordinate of the top left corner.
*/
public void paintIcon(Component c, Graphics g, int x, int y)
{
super.paintIcon(c, g, x, y);
int controlSize = getControlSize();
// Paint the horizontal highlight gradient:
MetouiaGradients.drawHighlight(
g, new Rectangle(
x + 1, y + 1, controlSize - 3, controlSize / 2), true, true);
// Paint the horizontal shadow gradient:
MetouiaGradients.drawShadow(
g, new Rectangle(
x + 1, y + controlSize / 2, controlSize - 3, controlSize / 2),
true, false);
//fix for missing pixel in top right corner (aesthetic fix)
//works with positional changes, and controlSize changes.
g.setColor(MetalLookAndFeel.getControlDarkShadow());
g.drawLine(x+controlSize-2,y+1,x+controlSize-2,y+1);
}
}
--- NEW FILE: MetouiaDefaultTheme.java ---
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Metouia Look And Feel: a free pluggable look and feel for java *
* http://mlf.sourceforge.net *
* (C) Copyright 2002, by Taoufik Romdhane and Contributors. *
* *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by *
* the Free Software Foundation; either version 2.1 of the License, or (at *
* your option) any later version. *
* *
* This library 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 Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. *
* *
* MetouiaDefaultTheme.java *
* Original Author: Taoufik Romdhane *
* Contributor(s): *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package net.sourceforge.mlf.metouia;
import java.awt.Font;
import java.awt.Color;
import javax.swing.UIDefaults;
import javax.swing.UIManager;
import javax.swing.plaf.ColorUIResource;
import javax.swing.plaf.FontUIResource;
import javax.swing.plaf.metal.DefaultMetalTheme;
/**
* This class represents the default Metouia theme.
* Extend this class in order to creates themes compatible to the Metouia Look
* and Feel.
*
* @author Taoufik Romdhane
*/
public class MetouiaDefaultTheme extends DefaultMetalTheme
{
/**
* Primary Color 1, used for the following:
* Active internal window borders.
* Shadows of activated items.
* System text (for example, labels).
*/
private final ColorUIResource primary1 = new ColorUIResource(0, 0, 0);
/**
* Primary Color 2, used for the following:
* Highlighting to indicate activation (for example, of menu titles and menu
* items); indication of keyboard focus.
* Shadows (color).
* Scrollbars.
*/
private final ColorUIResource primary2 = new ColorUIResource(213, 208, 198);
/**
* Primary Color 3, used for the following:
* Large colored areas (for example, the active title bar).
* Text selection.
* Tooltips background.
* InternalFrame TitleBar.
*/
private final ColorUIResource primary3 = new ColorUIResource(213, 208, 198);
/**
* Secondary Color 2, used for the following:
* Dark border for flush 3D style.
*/
private final ColorUIResource secondary1 = new ColorUIResource(133, 124, 93);
/**
* Secondary Color 2, used for the following:
* Inactive internal window borders; dimmed button borders.
* Shadows; highlighting of toolbar buttons upon mouse button down.
* Dimmed text (for example, inactive menu items or labels).
*/
private final ColorUIResource secondary2 = new ColorUIResource(171, 171, 159);
/**
* Secondary Color 3, used for the following:
* Canvas color (that is, normal background color); inactive title bar.
* Background for noneditable text fields.
*/
private final ColorUIResource secondary3 = new ColorUIResource(238, 238, 230);
/**
* The background color of a pressed button.
* Intrduced by Metouia Look And Feel.
*/
private final ColorUIResource secondary4 = new ColorUIResource(190, 190, 170);
/**
* The upper gradient color for components like JButton, JMenuBar and
* JProgressBar.
*/
private final Color gradientReflection = new Color(255, 255, 255, 86);
/**
* The lower gradient color for components like JButton, JMenuBar and
* JProgressBar.
*/
private final Color gradientShadow = new Color(188, 188, 180, 100);
/**
* The transluscent variation of the upper gradient color for components
* like JButton, JMenuBar and JProgressBar.
*/
private final Color gradientTranslucentReflection =
new Color(gradientReflection.getRGB() & 0x00FFFFFF, true);
/**
* The transluscent variation of the lower gradient color for components
* like JButton, JMenuBar and JProgressBar.
*/
private final Color gradientTranslucentShadow =
new Color(gradientShadow.getRGB() & 0x00FFFFFF, true);
/**
* A plain sans serif font used troughout the Metouia Default Theme.
*/
private FontUIResource plainFont =
new FontUIResource("SansSerif", Font.PLAIN, 12);;
/**
* A bold sans serif font used troughout the Metouia Default Theme.
*/
private FontUIResource boldFont =
new FontUIResource("SansSerif", Font.PLAIN, 12);
/**
* Gets the upper gradient color for components like JButton, JMenuBar and
* JProgressBar.
*
* @return The gradient reflection color.
*/
public Color getGradientReflection()
{
return gradientReflection;
}
/**
* Gets the lower gradient color for components like JButton, JMenuBar and
* JProgressBar.
*
* @return The gradient shadow color.
*/
public Color getGradientShadow()
{
return gradientShadow;
}
/**
* Gets the transluscent variation of the upper gradient color for components
* like JButton, JMenuBar and JProgressBar.
*
* @return The transluscent gradient reflection color.
*/
public Color getGradientTranslucentReflection()
{
return gradientTranslucentReflection;
}
/**
* Gets the transluscent variation of the lower gradient color for components
* like JButton, JMenuBar and JProgressBar.
*
* @return The transluscent gradient shadow color.
*/
public Color getGradientTranslucentShadow()
{
return gradientTranslucentShadow;
}
/**
* Gets the Font of Labels in many cases.
*
* @return The Font of Labels in many cases.
*/
public FontUIResource getControlTextFont()
{
return plainFont;
}
/**
* Gets the Font of Menus and MenuItems.
*
* @return The Font of Menus and MenuItems.
*/
public FontUIResource getMenuTextFont()
{
return plainFont;
}
/**
* Gets the Font of Nodes in JTrees.
*
* @return The Font of N...
[truncated message content] |