modify the license.

This commit is contained in:
huanghongxun
2015-06-22 17:25:47 +08:00
parent 0656227183
commit c760461f91
192 changed files with 2863 additions and 1389 deletions

View File

@@ -1,6 +1,18 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
* Copyright 2013 huangyuhui <huanghongxun2008@126.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program.
*/
package org.jackhuang.hellominecraft.lookandfeel;
@@ -15,6 +27,7 @@ public class HelloMinecraftLookAndFeel extends SynthLookAndFeel {
/**
* Creates a new instance of NimbusLookAndFeel
* @throws java.text.ParseException error parsing the xml, it must not happen.
*/
public HelloMinecraftLookAndFeel() throws ParseException {
load(HelloMinecraftLookAndFeel.class.getResourceAsStream("/org/jackhuang/hellominecraft/lookandfeel/synth.xml"), HelloMinecraftLookAndFeel.class);
@@ -45,6 +58,7 @@ public class HelloMinecraftLookAndFeel extends SynthLookAndFeel {
*
* @return textual description of this look and feel.
*/
@Override
public String getDescription() {
return "HelloMinecraftLookAndFeel";
}

View File

@@ -1,9 +1,19 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
* Copyright 2013 huangyuhui <huanghongxun2008@126.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program.
*/
package org.jackhuang.hellominecraft.lookandfeel.components;
import java.awt.Color;

View File

@@ -1,9 +1,19 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
* Copyright 2013 huangyuhui <huanghongxun2008@126.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program.
*/
package org.jackhuang.hellominecraft.lookandfeel.components;
/**

View File

@@ -1,13 +1,3 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.jackhuang.hellominecraft.lookandfeel.painters;
/**
*
* @author hyh
*/
/*
* $Id: MetroGraphicsUtils.java,v 1.9 2005/12/05 15:00:55 kizune Exp $
*
@@ -28,6 +18,8 @@ package org.jackhuang.hellominecraft.lookandfeel.painters;
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
package org.jackhuang.hellominecraft.lookandfeel.painters;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;

View File

@@ -1,9 +1,3 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.jackhuang.hellominecraft.lookandfeel.painters;
/*
* $Id: MetroGraphicsUtils.java,v 1.9 2005/12/05 15:00:55 kizune Exp $
*
@@ -24,6 +18,8 @@ package org.jackhuang.hellominecraft.lookandfeel.painters;
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
package org.jackhuang.hellominecraft.lookandfeel.painters;
import org.jackhuang.hellominecraft.lookandfeel.GraphicsUtils;
import javax.swing.plaf.synth.SynthContext;

View File

@@ -1,9 +1,3 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.jackhuang.hellominecraft.lookandfeel.painters;
/*
* $Id: NimbusGraphicsUtils.java,v 1.9 2005/12/05 15:00:55 kizune Exp $
*
@@ -24,6 +18,7 @@ package org.jackhuang.hellominecraft.lookandfeel.painters;
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
package org.jackhuang.hellominecraft.lookandfeel.painters;
import javax.swing.plaf.synth.SynthContext;
import javax.swing.plaf.synth.SynthPainter;

View File

@@ -1,7 +1,3 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.jackhuang.hellominecraft.lookandfeel.ui;
import static org.jackhuang.hellominecraft.lookandfeel.GraphicsUtils.loadImage;
@@ -70,7 +66,9 @@ public class ComboBoxUI extends BasicComboBoxUI implements MouseListener {
/**
* The minumum size is the size of the display area plus insets plus the
* button.
* @return the size yeah.
*/
@Override
public Dimension getMinimumSize(JComponent c) {
if (!isMinimumSizeDirty) {
return new Dimension(cachedMinimumSize);
@@ -88,6 +86,7 @@ public class ComboBoxUI extends BasicComboBoxUI implements MouseListener {
return new Dimension(size);
}
@Override
protected JButton createArrowButton() {
JButton button = new JButton() {
@Override
@@ -114,6 +113,7 @@ public class ComboBoxUI extends BasicComboBoxUI implements MouseListener {
return button;
}
@Override
public void paint(Graphics g, JComponent c) {
hasFocus = comboBox.hasFocus();
ListCellRenderer renderer = comboBox.getRenderer();
@@ -173,6 +173,7 @@ public class ComboBoxUI extends BasicComboBoxUI implements MouseListener {
}
}
@Override
protected LayoutManager createLayoutManager() {
return new ComboLayout();
}
@@ -186,9 +187,11 @@ public class ComboBoxUI extends BasicComboBoxUI implements MouseListener {
private boolean mouseInside = false;
private boolean mouseDown = false;
@Override
public void mouseClicked(MouseEvent e) {
}
@Override
public void mouseEntered(MouseEvent e) {
if (comboBox.isEditable()) {
if (e.getComponent() == arrowButton) {
@@ -200,6 +203,7 @@ public class ComboBoxUI extends BasicComboBoxUI implements MouseListener {
}
}
@Override
public void mouseExited(MouseEvent e) {
if (comboBox.isEditable()) {
if (e.getComponent() == arrowButton) {
@@ -211,6 +215,7 @@ public class ComboBoxUI extends BasicComboBoxUI implements MouseListener {
}
}
@Override
public void mousePressed(MouseEvent e) {
if (comboBox.isEditable()) {
if (e.getComponent() == arrowButton) {
@@ -222,6 +227,7 @@ public class ComboBoxUI extends BasicComboBoxUI implements MouseListener {
}
}
@Override
public void mouseReleased(MouseEvent e) {
if (comboBox.isEditable()) {
if (e.getComponent() == arrowButton) {
@@ -237,20 +243,25 @@ public class ComboBoxUI extends BasicComboBoxUI implements MouseListener {
// LayoutManager
private class ComboLayout implements LayoutManager {
@Override
public void addLayoutComponent(String name, Component comp) {
}
@Override
public void removeLayoutComponent(Component comp) {
}
@Override
public Dimension preferredLayoutSize(Container parent) {
return parent.getPreferredSize();
}
@Override
public Dimension minimumLayoutSize(Container parent) {
return parent.getMinimumSize();
}
@Override
public void layoutContainer(Container parent) {
JComboBox cb = (JComboBox) parent;
int width = cb.getWidth();

View File

@@ -1,9 +1,3 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.jackhuang.hellominecraft.lookandfeel.ui;
/*
* $Id: NimbusGraphicsUtils.java,v 1.9 2005/12/05 15:00:55 kizune Exp $
*
@@ -24,6 +18,7 @@ package org.jackhuang.hellominecraft.lookandfeel.ui;
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
package org.jackhuang.hellominecraft.lookandfeel.ui;
import javax.swing.DefaultListCellRenderer;
import javax.swing.JList;

View File

@@ -1,30 +1,25 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
* $Id: NimbusGraphicsUtils.java,v 1.9 2005/12/05 15:00:55 kizune Exp $
*
* Copyright 2004 Sun Microsystems, Inc., 4150 Network Circle,
* Santa Clara, California 95054, U.S.A. All rights reserved.
*
* 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 Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
package org.jackhuang.hellominecraft.lookandfeel.ui;
/*
* $Id: NimbusGraphicsUtils.java,v 1.9 2005/12/05 15:00:55 kizune Exp $
*
* Copyright 2004 Sun Microsystems, Inc., 4150 Network Circle,
* Santa Clara, California 95054, U.S.A. All rights reserved.
*
* 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 Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
import static javax.swing.SwingConstants.NORTH;
import static javax.swing.SwingConstants.SOUTH;
@@ -34,7 +29,8 @@ import java.awt.Dimension;
import java.awt.Graphics;
/**
* NimbusScrollButton - a fixed size 15x17 vertical 17x15 horizontal transparent button.
* NimbusScrollButton - a fixed size 15x17 vertical 17x15 horizontal transparent
* button.
*
* @author Created by Jasper Potts (Jan 17, 2007)
* @version 1.0
@@ -55,19 +51,23 @@ public class ScrollButton extends MetalScrollButton implements SwingConstants {
}
}
@Override public Dimension getMaximumSize() {
@Override
public Dimension getMaximumSize() {
return this.getPreferredSize();
}
@Override public Dimension getMinimumSize() {
@Override
public Dimension getMinimumSize() {
return this.getPreferredSize();
}
@Override public Dimension getPreferredSize() {
@Override
public Dimension getPreferredSize() {
return new Dimension(btnWidth, btnHeight);
}
@Override public void repaint(long tm, int x, int y, int width, int height) {
@Override
public void repaint(long tm, int x, int y, int width, int height) {
if (getParent() != null) getParent().repaint();
}
@@ -76,7 +76,7 @@ public class ScrollButton extends MetalScrollButton implements SwingConstants {
*
* @param g {@inheritDoc}
*/
@Override public void paint(Graphics g) {
@Override
public void paint(Graphics g) {
}
}

View File

@@ -1,3 +1,19 @@
<!--
Copyright 2013 huangyuhui <huanghongxun2008@126.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program 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 for more details.
You should have received a copy of the GNU General Public License
along with this program.
-->
<synth>
<!-- ########################################################################################################### -->