=== modified file 'src/org/appwork/swing/components/tooltips/BasicExtTooltip.java' --- src/org/appwork/swing/components/tooltips/BasicExtTooltip.java 2016-02-03 16:57:38 +0000 +++ src/org/appwork/swing/components/tooltips/BasicExtTooltip.java 2023-11-24 15:50:47 +0000 @@ -33,7 +33,6 @@ * ==================================================================================================================================================== */ package org.appwork.swing.components.tooltips; -import java.awt.Color; import java.awt.Graphics; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; @@ -42,7 +41,6 @@ import javax.swing.JTextArea; import javax.swing.event.AncestorEvent; -import org.appwork.swing.components.tooltips.config.ExtTooltipSettings; import org.appwork.utils.swing.SwingUtils; /** @@ -50,7 +48,6 @@ * */ public class BasicExtTooltip extends ExtTooltip implements PropertyChangeListener { - /** * */ @@ -64,16 +61,13 @@ public BasicExtTooltip(final JComponent circledProgressBar) { super(); this.component = circledProgressBar; - // this.tf.setText(this.component.getToolTipText()); - this.component.addPropertyChangeListener(JComponent.TOOL_TIP_TEXT_KEY, this); this.tf.setText(this.component.getToolTipText()); } @Override public void ancestorRemoved(final AncestorEvent event) { - this.component.removePropertyChangeListener(JComponent.TOOL_TIP_TEXT_KEY, this); } @@ -94,15 +88,11 @@ final TooltipPanel p = new TooltipPanel("ins 2,wrap 1", "[]", "[]"); this.tf = new JTextArea(); // this.tf.setEnabled(false); - ExtTooltipSettings cfg = this.getConfig(); - Color c = new Color(cfg.getForegroundColor()); - this.tf.setForeground(c); + this.tf.setForeground(FOREGROUND_COLOR); this.tf.setBackground(null); this.tf.setEditable(false); SwingUtils.setOpaque(this.tf, false); - p.add(this.tf); - return p; } @@ -113,9 +103,7 @@ @Override public void paint(final Graphics g) { - super.paint(g); - } /* @@ -125,18 +113,13 @@ */ @Override public void propertyChange(final PropertyChangeEvent evt) { - if (this.component.getToolTipText() == null || this.component.getToolTipText().length() == 0) { ToolTipController.getInstance().hideTooltip(); } else { - this.tf.setText(this.component.getToolTipText()); - System.out.println(this.component.getToolTipText()); - this.repaint(); } - } /* @@ -146,7 +129,6 @@ */ @Override public String toText() { - // TODO Auto-generated method stub return tf.getText(); } } === modified file 'src/org/appwork/swing/components/tooltips/BasicTooltipFactory.java' --- src/org/appwork/swing/components/tooltips/BasicTooltipFactory.java 2015-10-30 14:15:51 +0000 +++ src/org/appwork/swing/components/tooltips/BasicTooltipFactory.java 2023-11-24 15:50:47 +0000 @@ -1,5 +1,5 @@ /** - * + * * ==================================================================================================================================================== * "AppWork Utilities" License * The "AppWork Utilities" will be called [The Product] from now on. @@ -7,16 +7,16 @@ * Copyright (c) 2009-2015, AppWork GmbH * Schwabacher Straße 117 * 90763 Fürth - * Germany + * Germany * === Preamble === * This license establishes the terms under which the [The Product] Source Code & Binary files may be used, copied, modified, distributed, and/or redistributed. * The intent is that the AppWork GmbH is able to provide their utilities library for free to non-commercial projects whereas commercial usage is only permitted after obtaining a commercial license. * These terms apply to all files that have the [The Product] License header (IN the file), a .license or .info (like mylib.jar.info) file that contains a reference to this license. - * + * * === 3rd Party Licences === * Some parts of the [The Product] use or reference 3rd party libraries and classes. These parts may have different licensing conditions. Please check the *.license and *.info files of included libraries - * to ensure that they are compatible to your use-case. Further more, some *.java have their own license. In this case, they have their license terms in the java file header. - * + * to ensure that they are compatible to your use-case. Further more, some *.java have their own license. In this case, they have their license terms in the java file header. + * * === Definition: Commercial Usage === * If anybody or any organization is generating income (directly or indirectly) by using [The Product] or if there's any commercial interest or aspect in what you are doing, we consider this as a commercial usage. * If your use-case is neither strictly private nor strictly educational, it is commercial. If you are unsure whether your use-case is commercial or not, consider it as commercial or contact us. @@ -25,16 +25,14 @@ * If you want to use [The Product] in a commercial way (see definition above), you have to obtain a paid license from AppWork GmbH. * Contact AppWork for further details: * === Non-Commercial Usage === - * If there is no commercial usage (see definition above), you may use [The Product] under the terms of the + * If there is no commercial usage (see definition above), you may use [The Product] under the terms of the * "GNU Affero General Public License" (http://www.gnu.org/licenses/agpl-3.0.en.html). - * + * * If the AGPL does not fit your needs, please contact us. We'll find a solution. * ==================================================================================================================================================== * ==================================================================================================================================================== */ package org.appwork.swing.components.tooltips; -import java.awt.Color; - import javax.swing.BorderFactory; import javax.swing.Icon; import javax.swing.JLabel; @@ -42,7 +40,6 @@ import org.appwork.utils.swing.SwingUtils; public class BasicTooltipFactory implements TooltipFactory { - /** * @param name * @param editScriptAction_EditScriptAction_tt @@ -52,20 +49,17 @@ this.header = name; this.text = tooltip; this.icon = icon2; - } @Override public ExtTooltip createTooltip() { TooltipPanel p = new TooltipPanel("ins 3", "[][grow,fill]", "[][grow,fill]"); - Color fg = new Color(ExtTooltip.createConfig(ExtTooltip.DEFAULT).getForegroundColor()); JLabel headerLbl = SwingUtils.toBold(new JLabel(getHeader())); - headerLbl.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, fg)); - headerLbl.setForeground(fg); + headerLbl.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, ExtTooltip.FOREGROUND_COLOR)); + headerLbl.setForeground(ExtTooltip.FOREGROUND_COLOR); JLabel iconLbl = new JLabel(getIcon()); - JLabel txt = new JLabel(); - txt.setForeground(fg); + txt.setForeground(ExtTooltip.FOREGROUND_COLOR); txt.setText("" + getText().replaceAll("[\r\n]+", "
") + ""); p.add(headerLbl, "hidemode 2,spanx,pushx,growx"); p.add(iconLbl, "hidemode 2"); === modified file 'src/org/appwork/swing/components/tooltips/IconLabelToolTip.java' --- src/org/appwork/swing/components/tooltips/IconLabelToolTip.java 2015-10-30 14:15:51 +0000 +++ src/org/appwork/swing/components/tooltips/IconLabelToolTip.java 2023-11-24 15:50:47 +0000 @@ -1,5 +1,5 @@ /** - * + * * ==================================================================================================================================================== * "AppWork Utilities" License * The "AppWork Utilities" will be called [The Product] from now on. @@ -7,16 +7,16 @@ * Copyright (c) 2009-2015, AppWork GmbH * Schwabacher Straße 117 * 90763 Fürth - * Germany + * Germany * === Preamble === * This license establishes the terms under which the [The Product] Source Code & Binary files may be used, copied, modified, distributed, and/or redistributed. * The intent is that the AppWork GmbH is able to provide their utilities library for free to non-commercial projects whereas commercial usage is only permitted after obtaining a commercial license. * These terms apply to all files that have the [The Product] License header (IN the file), a .license or .info (like mylib.jar.info) file that contains a reference to this license. - * + * * === 3rd Party Licences === * Some parts of the [The Product] use or reference 3rd party libraries and classes. These parts may have different licensing conditions. Please check the *.license and *.info files of included libraries - * to ensure that they are compatible to your use-case. Further more, some *.java have their own license. In this case, they have their license terms in the java file header. - * + * to ensure that they are compatible to your use-case. Further more, some *.java have their own license. In this case, they have their license terms in the java file header. + * * === Definition: Commercial Usage === * If anybody or any organization is generating income (directly or indirectly) by using [The Product] or if there's any commercial interest or aspect in what you are doing, we consider this as a commercial usage. * If your use-case is neither strictly private nor strictly educational, it is commercial. If you are unsure whether your use-case is commercial or not, consider it as commercial or contact us. @@ -25,16 +25,14 @@ * If you want to use [The Product] in a commercial way (see definition above), you have to obtain a paid license from AppWork GmbH. * Contact AppWork for further details: * === Non-Commercial Usage === - * If there is no commercial usage (see definition above), you may use [The Product] under the terms of the + * If there is no commercial usage (see definition above), you may use [The Product] under the terms of the * "GNU Affero General Public License" (http://www.gnu.org/licenses/agpl-3.0.en.html). - * + * * If the AGPL does not fit your needs, please contact us. We'll find a solution. * ==================================================================================================================================================== * ==================================================================================================================================================== */ package org.appwork.swing.components.tooltips; -import java.awt.Color; - import javax.swing.Icon; import javax.swing.ImageIcon; import javax.swing.JLabel; @@ -42,17 +40,13 @@ import org.appwork.utils.swing.SwingUtils; public class IconLabelToolTip extends ExtTooltip { - /** - * + * */ private static final long serialVersionUID = 1437567673004968332L; - - private String name; - - private Icon icon; - - protected JLabel label; + private String name; + private Icon icon; + protected JLabel label; /** * @param host @@ -70,7 +64,7 @@ final TooltipPanel ret = new TooltipPanel("ins 0", "[grow,fill]", "[]"); label = new JLabel(); SwingUtils.setOpaque(label, false); - label.setForeground(new Color(getConfig().getForegroundColor())); + label.setForeground(ExtTooltip.FOREGROUND_COLOR); ret.add(label); return ret; } @@ -86,7 +80,6 @@ public void setIcon(final ImageIcon icon) { this.icon = icon; - label.setIcon(icon); this.repaint(); } @@ -98,12 +91,13 @@ this.repaint(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.appwork.swing.components.tooltips.ExtTooltip#toText() */ @Override public String toText() { - // TODO Auto-generated method stub return label.getText(); } } === modified file 'src/org/appwork/swing/components/tooltips/MultiLineLabelTooltip.java' --- src/org/appwork/swing/components/tooltips/MultiLineLabelTooltip.java 2015-10-30 14:15:51 +0000 +++ src/org/appwork/swing/components/tooltips/MultiLineLabelTooltip.java 2023-11-24 15:50:47 +0000 @@ -1,5 +1,5 @@ /** - * + * * ==================================================================================================================================================== * "AppWork Utilities" License * The "AppWork Utilities" will be called [The Product] from now on. @@ -7,16 +7,16 @@ * Copyright (c) 2009-2015, AppWork GmbH * Schwabacher Straße 117 * 90763 Fürth - * Germany + * Germany * === Preamble === * This license establishes the terms under which the [The Product] Source Code & Binary files may be used, copied, modified, distributed, and/or redistributed. * The intent is that the AppWork GmbH is able to provide their utilities library for free to non-commercial projects whereas commercial usage is only permitted after obtaining a commercial license. * These terms apply to all files that have the [The Product] License header (IN the file), a .license or .info (like mylib.jar.info) file that contains a reference to this license. - * + * * === 3rd Party Licences === * Some parts of the [The Product] use or reference 3rd party libraries and classes. These parts may have different licensing conditions. Please check the *.license and *.info files of included libraries - * to ensure that they are compatible to your use-case. Further more, some *.java have their own license. In this case, they have their license terms in the java file header. - * + * to ensure that they are compatible to your use-case. Further more, some *.java have their own license. In this case, they have their license terms in the java file header. + * * === Definition: Commercial Usage === * If anybody or any organization is generating income (directly or indirectly) by using [The Product] or if there's any commercial interest or aspect in what you are doing, we consider this as a commercial usage. * If your use-case is neither strictly private nor strictly educational, it is commercial. If you are unsure whether your use-case is commercial or not, consider it as commercial or contact us. @@ -25,15 +25,14 @@ * If you want to use [The Product] in a commercial way (see definition above), you have to obtain a paid license from AppWork GmbH. * Contact AppWork for further details: * === Non-Commercial Usage === - * If there is no commercial usage (see definition above), you may use [The Product] under the terms of the + * If there is no commercial usage (see definition above), you may use [The Product] under the terms of the * "GNU Affero General Public License" (http://www.gnu.org/licenses/agpl-3.0.en.html). - * + * * If the AGPL does not fit your needs, please contact us. We'll find a solution. * ==================================================================================================================================================== * ==================================================================================================================================================== */ package org.appwork.swing.components.tooltips; -import java.awt.Color; import java.util.ArrayList; import javax.swing.Icon; @@ -96,14 +95,11 @@ public MultiLineLabelTooltip(final LabelInfo... labels) { panel = new TooltipPanel("ins 3,wrap 1", "[grow,fill]", "[grow,fill]"); - for (final LabelInfo link : labels) { - JLabel lbl; panel.add(lbl = new JLabel(link.getText(), link.getIcon(), link.getConstrains())); SwingUtils.setOpaque(lbl, false); - lbl.setForeground(new Color(getConfig().getForegroundColor())); - + lbl.setForeground(ExtTooltip.FOREGROUND_COLOR); } panel.setOpaque(false); add(panel); @@ -118,7 +114,6 @@ @Override public TooltipPanel createContent() { - return null; } @@ -126,5 +121,4 @@ public String toText() { return null; } - } === modified file 'src/org/appwork/swing/components/tooltips/PanelToolTip.java' --- src/org/appwork/swing/components/tooltips/PanelToolTip.java 2015-10-30 14:15:51 +0000 +++ src/org/appwork/swing/components/tooltips/PanelToolTip.java 2023-11-24 15:50:47 +0000 @@ -54,7 +54,7 @@ @Override public TooltipPanel createContent() { - // TODO Auto-generated method stub + return null; } @@ -63,7 +63,7 @@ */ @Override public String toText() { - // TODO Auto-generated method stub + return null; } === modified file 'src/org/appwork/swing/components/tooltips/ToolTipController.java' --- src/org/appwork/swing/components/tooltips/ToolTipController.java 2022-12-13 15:18:26 +0000 +++ src/org/appwork/swing/components/tooltips/ToolTipController.java 2023-11-24 15:50:47 +0000 @@ -560,7 +560,7 @@ */ @Override public void windowGainedFocus(final WindowEvent e) { - // TODO Auto-generated method stub + } /* @@ -580,7 +580,7 @@ */ @Override public void mousePressed(final MouseEvent e) { - // TODO Auto-generated method stub + } /* @@ -590,6 +590,6 @@ */ @Override public void mouseReleased(final MouseEvent e) { - // TODO Auto-generated method stub + } }