Author: tchemit Date: 2008-01-21 20:53:22 +0000 (Mon, 21 Jan 2008) New Revision: 183 Added: trunk/jaxx/src/main/java/jaxx/runtime/builder/ trunk/jaxx/src/main/java/jaxx/runtime/builder/ActionConfig.java trunk/jaxx/src/main/java/jaxx/runtime/builder/ActionFactory.java trunk/jaxx/src/main/java/jaxx/runtime/builder/SelectActionConfig.java trunk/jaxx/src/main/java/jaxx/runtime/builder/TabContentConfig.java trunk/jaxx/src/main/java/jaxx/runtime/builder/ToggleActionConfig.java Log: des annotations pour configurer des actions au runtime ajout d'une facotry pour g?\195?\169rer des actions (les actions doivent ?\195?\170tre stateless) Added: trunk/jaxx/src/main/java/jaxx/runtime/builder/ActionConfig.java =================================================================== --- trunk/jaxx/src/main/java/jaxx/runtime/builder/ActionConfig.java (rev 0) +++ trunk/jaxx/src/main/java/jaxx/runtime/builder/ActionConfig.java 2008-01-21 20:53:22 UTC (rev 183) @@ -0,0 +1,122 @@ +/* +* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin, +* Tony Chemit, Gabriel Landais +* +* 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; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* ##% */ +package jaxx.runtime.builder; + +import jaxx.runtime.JAXXObject; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Pour enregister une action. + * <p/> + * Placer cette annotation sur la classe implantant l'action, + * <p/> + * les informations d�crites seront utilis�es pour instancier l'action + * + * @author chemit + */ +@Retention(RetentionPolicy.RUNTIME) + +@Target(ElementType.TYPE) + +public @interface ActionConfig { + + /** + * @return la clef de la commande (doit �tre unique) + * @see javax.swing.Action#ACTION_COMMAND_KEY + */ + String actionCommand(); + + /** + * @return la clef i18n du texte de l'action, si vide ignor� + * @see javax.swing.Action#NAME + */ + String name() default ""; + + /** + * @return la clef i18n du tooltip de l'action, si vide ignor� + * @see javax.swing.Action#SHORT_DESCRIPTION + */ + String shortDescription() default ""; + + /** + * @return la clef i18n du texte de l'action, si vide ignor� + * @see javax.swing.Action#LONG_DESCRIPTION + */ + String longDescription() default ""; + + /** + * @return le nom de l'icone associ�, si vide ignor� + * @see javax.swing.Action#SMALL_ICON + */ + String smallIcon() default ""; + + /** + * @return le nom du grande icone associ�, si vide ignor� + * @see javax.swing.Action#LARGE_ICON_KEY + */ + String largeIcon() default ""; + + /** + * @return + * @see javax.swing.Action#ACCELERATOR_KEY + */ + String accelerator() default ""; + + /** + * @return + * @see javax.swing.Action#MNEMONIC_KEY + */ + int mnemonic() default '\0'; + + /** + * @return + * @see javax.swing.Action#DISPLAYED_MNEMONIC_INDEX_KEY + */ + int displayedMnemonicIndex() default '\0'; + + /** + * @return la valeur par d�faut pour les component selectable + * @see javax.swing.Action#SELECTED_KEY + */ + boolean selected() default false; + + /** + * @return + * @see javax.swing.Action#isEnabled() + */ + boolean enabled() default true; + + /** + * @return + * @see javax.swing.Action#isEnabled() + */ + boolean hideActionText() default false; + + + /** + * @return la class du container jaxx associ� + * @see javax.swing.Action#NAME + */ + Class<? extends JAXXObject> container(); + +} \ No newline at end of file Added: trunk/jaxx/src/main/java/jaxx/runtime/builder/ActionFactory.java =================================================================== --- trunk/jaxx/src/main/java/jaxx/runtime/builder/ActionFactory.java (rev 0) +++ trunk/jaxx/src/main/java/jaxx/runtime/builder/ActionFactory.java 2008-01-21 20:53:22 UTC (rev 183) @@ -0,0 +1,357 @@ +/* +* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin, +* Tony Chemit +* +* 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; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* ##% */ +package jaxx.runtime.builder; + +import jaxx.runtime.JAXXObject; +import jaxx.runtime.UIHelper; +import jaxx.runtime.swing.JAXXToggleButton; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import static org.codelutin.i18n.I18n._; + +import javax.swing.AbstractAction; +import javax.swing.AbstractButton; +import javax.swing.Action; +import javax.swing.Icon; +import javax.swing.JComboBox; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.TreeMap; + +/** + * Action factory using the ActionConfig annotations to configure the action. + * <p/> + * The factory is abstract, implements method {@link #init()} to fill the + * dictonary of known action implementations. + * <p/> + * Use after the {@link #loadActions(jaxx.runtime.JAXXObject)} to instanciate + * actions in ui with id equals a known action... + * <p/> + * TODO Finish doc + * + * @author chemit + */ +public abstract class ActionFactory { + + private static Log log = LogFactory.getLog(ActionFactory.class); + + /** dictionary of known actions implementations */ + private Map<String, Class<? extends AbstractAction>> impls; + /** dictionary of instanciated actions */ + private Map<String, AbstractAction> cache; + + /** + * Method to init the dictionary of knwon action implementations. + * + * @return the dictionary of known action implementations + */ + protected abstract Map<String, Class<? extends AbstractAction>> init(); + + protected ActionFactory() { + impls = init(); + cache = new TreeMap<String, AbstractAction>(); + } + + public void resetCache() { + cache.clear(); + } + + @Override + protected void finalize() throws Throwable { + super.finalize(); + resetCache(); + impls.clear(); + } + + public AbstractAction[] loadActions(JAXXObject ui) { + List<AbstractAction> result = new ArrayList<AbstractAction>(); + for (Map.Entry<String, Class<? extends AbstractAction>> entry : implsEntrySet()) { + String actionKey = entry.getKey(); + Object comp = ui.getObjectById(actionKey); + if (comp == null || !(comp instanceof AbstractButton || comp instanceof JComboBox)) { + // nothing to do + continue; + } + + if (comp instanceof AbstractButton) { + AbstractButton component = (AbstractButton) comp; + AbstractAction action = newAction(actionKey, component); + + component.setAction(action); + + if (component instanceof JAXXToggleButton) { + JAXXToggleButton glueComponent = (JAXXToggleButton) component; + glueComponent.setIcon((Icon) action.getValue(Action.SMALL_ICON)); + Integer integer = (Integer) action.getValue(Action.MNEMONIC_KEY); + if (integer != null) { + glueComponent.setNormalMnemonic(integer); + } + glueComponent.setSelectedIcon((Icon) action.getValue(Action.SMALL_ICON + 2)); + integer = (Integer) action.getValue(Action.MNEMONIC_KEY + 2); + if (integer != null) { + glueComponent.setGlueMnemonic(integer); + } + glueComponent.setGlueText((String) action.getValue(Action.NAME + 2)); + glueComponent.setGlueTooltipText((String) action.getValue(Action.SHORT_DESCRIPTION + 2)); + + glueComponent.setNormalText((String) action.getValue(Action.NAME)); + glueComponent.setNormalTooltipText((String) action.getValue(Action.SHORT_DESCRIPTION)); + } + + Boolean value = (Boolean) action.getValue("hideActionText"); + + component.setHideActionText(value != null && value); + result.add(action); + continue; + } + + if (comp instanceof JComboBox) { + JComboBox component = (JComboBox) comp; + AbstractAction action = newAction(actionKey, component); + + component.setAction(action); + Integer val = (Integer) action.getValue("selectedIndex"); + if (val != null && val != -1 && val < component.getItemCount() && val != component.getSelectedIndex()) { + component.setSelectedIndex(val); + } + result.add(action); + } + } + return result.toArray(new AbstractAction[result.size()]); + } + + /** + * @param actionKey le nom de l'action tel que d�finie dans le fichier + * de mapping (sans le prefix action.) + * @param component le button o� rattacher l'action + * @return une nouvelle instance de l'action associ�e � sa clef. + */ + public AbstractAction newAction(String actionKey, AbstractButton component) { + + // on v�rifie que l'action existe bien + checkRegistredAction(actionKey); + + // try in cache + if (cache.containsKey(actionKey)) { + // use cached action + return cache.get(actionKey); + } + // on r�cup�re la classe d'implantation de l'action + Class<? extends AbstractAction> klazz = impls.get(actionKey); + + try { + AbstractAction result = klazz.getConstructor(String.class).newInstance(actionKey); + result.putValue(Action.ACTION_COMMAND_KEY, actionKey); + + log.debug(actionKey + " : " + result); + // recherche de l'annotation de configuration + ActionConfig anno = initActionConfig(component, result); + + if (anno == null) { + ToggleActionConfig anno2 = initToggleActionConfig(component, result); + if (anno2 == null && component != null) { + result.putValue(Action.ACTION_COMMAND_KEY, component.getName()); + result.putValue(Action.SHORT_DESCRIPTION, component.getToolTipText()); + result.putValue(Action.SMALL_ICON, component.getIcon()); + result.putValue(Action.NAME, component.getText()); + result.putValue(Action.MNEMONIC_KEY, component.getMnemonic()); + result.putValue("hideActionText", component.getHideActionText()); + if (component instanceof JAXXToggleButton) { + JAXXToggleButton glueComponent = (JAXXToggleButton) component; + result.putValue(Action.SHORT_DESCRIPTION, glueComponent.getNormalTooltipText()); + result.putValue(Action.NAME, glueComponent.getNormalText()); + result.putValue(Action.SMALL_ICON, glueComponent.getIcon()); + result.putValue(Action.MNEMONIC_KEY, glueComponent.getNormalMnemonic()); + result.putValue(Action.SHORT_DESCRIPTION + 2, glueComponent.getGlueTooltipText()); + result.putValue(Action.NAME + 2, glueComponent.getGlueText()); + result.putValue(Action.SMALL_ICON + 2, glueComponent.getSelectedIcon()); + result.putValue(Action.MNEMONIC_KEY + 2, glueComponent.getGlueMnemonic()); + } + } + } + + String text = (String) result.getValue(Action.NAME); + Integer mnemo = (Integer) result.getValue(Action.MNEMONIC_KEY); + if (mnemo != null && mnemo != '\0') { + int pos = text.indexOf((char) mnemo.intValue()); + if (pos == -1) { + pos = text.indexOf(Character.toLowerCase((char) mnemo.intValue())); + } + result.putValue(Action.DISPLAYED_MNEMONIC_INDEX_KEY, pos); + } + cache.put(actionKey,result); + return result; + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + /** + * @param actionKey le nom de l'action tel que d�finie dans le fichier + * de mapping (sans le prefix action.) + * @param component le button o� rattacher l'action + * @return une nouvelle instance de l'action associ�e � sa clef. + */ + public AbstractAction newAction(String actionKey, JComboBox component) { + + // on v�rifie que l'action existe bien + checkRegistredAction(actionKey); + + // try in cache + if (cache.containsKey(actionKey)) { + // use cached action + return cache.get(actionKey); + } + + // on r�cup�re la classe d'implantation de l'action + Class<? extends AbstractAction> klazz = impls.get(actionKey); + + try { + AbstractAction result = klazz.getConstructor(String.class).newInstance(actionKey); + result.putValue(Action.ACTION_COMMAND_KEY, actionKey); + + log.debug(actionKey + " : " + result); + // recherche de l'annotation de configuration + SelectActionConfig anno = initSelectActionConfig(component, result); + if (anno == null) { + result.putValue(Action.ACTION_COMMAND_KEY, component.getName()); + result.putValue(Action.SHORT_DESCRIPTION, component.getToolTipText()); + //result.putValue("selectedIndex", component.getSelectedIndex()); + } + cache.put(actionKey,result); + return result; + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + public static ToggleActionConfig initToggleActionConfig(AbstractButton component, AbstractAction result) { + ToggleActionConfig anno = result.getClass().getAnnotation(ToggleActionConfig.class); + if (anno != null) { + // inject les donn�es + if (!anno.name().isEmpty()) { + //System.out.println("found action with name : " + anno.name()); + result.putValue(Action.NAME, _(anno.name())); + } + if (!anno.name2().isEmpty()) { + //System.out.println("found action with name2 : " + anno.name2()); + result.putValue(Action.NAME + "2", _(anno.name2())); + } + + if (!anno.shortDescription().isEmpty()) { + result.putValue(Action.SHORT_DESCRIPTION, _(anno.shortDescription())); + } + if (!anno.shortDescription2().isEmpty()) { + result.putValue(Action.SHORT_DESCRIPTION + "2", _(anno.shortDescription2())); + } + + if (!anno.smallIcon().isEmpty()) { + result.putValue(Action.SMALL_ICON, UIHelper.createImageIcon(anno.smallIcon())); + } + if (!anno.smallIcon2().isEmpty()) { + result.putValue(Action.SMALL_ICON + "2", UIHelper.createImageIcon(anno.smallIcon2())); + } + + if (anno.mnemonic() != '\0') { + result.putValue(Action.MNEMONIC_KEY, anno.mnemonic()); + } else if (component != null) { + result.putValue(Action.MNEMONIC_KEY, component.getMnemonic()); + } + if (anno.mnemonic2() != '\0') { + result.putValue(Action.MNEMONIC_KEY + "2", anno.mnemonic2()); + } + //TODO Convert it from String result.putValue(Action.ACCELERATOR_KEY, anno.accelerator()); + + + result.putValue("hideActionText", anno.hideActionText()); + result.putValue(Action.SELECTED_KEY, anno.selected()); + result.setEnabled(anno.enabled()); + } + return anno; + } + + public static ActionConfig initActionConfig(AbstractButton component, AbstractAction result) { + ActionConfig anno = result.getClass().getAnnotation(ActionConfig.class); + if (anno != null) { + // inject les donn�es + if (!anno.name().isEmpty()) { + //System.out.println("found action with name : " + anno.name()); + result.putValue(Action.NAME, _(anno.name())); + } + //if (!anno.shortDescription().isEmpty()) { + result.putValue(Action.SHORT_DESCRIPTION, _(anno.shortDescription())); + //} + if (!anno.smallIcon().isEmpty()) { + result.putValue(Action.SMALL_ICON, UIHelper.createImageIcon(anno.smallIcon())); + } + if (anno.mnemonic() != '\0') { + result.putValue(Action.MNEMONIC_KEY, anno.mnemonic()); + } else if (component != null) { + result.putValue(Action.MNEMONIC_KEY, component.getMnemonic()); + } + //TODO Convert it from String result.putValue(Action.ACCELERATOR_KEY, anno.accelerator()); + + + result.putValue("hideActionText", anno.hideActionText()); + result.putValue(Action.SELECTED_KEY, anno.selected()); + result.setEnabled(anno.enabled()); + } + return anno; + } + + public static SelectActionConfig initSelectActionConfig(JComboBox component, AbstractAction result) { + SelectActionConfig anno = result.getClass().getAnnotation(SelectActionConfig.class); + if (anno != null) { + // inject les donn�es + if (!anno.name().isEmpty()) { + result.putValue(Action.NAME, _(anno.name())); + } + if (!anno.shortDescription().isEmpty()) { + result.putValue(Action.SHORT_DESCRIPTION, _(anno.shortDescription())); + } else { + result.putValue(Action.SHORT_DESCRIPTION, _(component.getToolTipText())); + } + result.putValue("selectedIndex", anno.selectedIndex()); + //TODO Convert it from String result.putValue(Action.ACCELERATOR_KEY, anno.accelerator()); + result.setEnabled(anno.enabled()); + } + return anno; + } + + + protected void checkRegistredAction(String actionKey) { + if (!impls.containsKey(actionKey)) { + throw new IllegalStateException("can not find a registered action for key " + actionKey); + } + } + + public String[] getActionNames() { + return impls.keySet().toArray(new String[impls.size()]); + } + + public Set<Map.Entry<String, Class<? extends AbstractAction>>> implsEntrySet() { + return impls.entrySet(); + } + + public Set<Map.Entry<String, AbstractAction>> cacheEntrySet() { + return cache.entrySet(); + } +} Added: trunk/jaxx/src/main/java/jaxx/runtime/builder/SelectActionConfig.java =================================================================== --- trunk/jaxx/src/main/java/jaxx/runtime/builder/SelectActionConfig.java (rev 0) +++ trunk/jaxx/src/main/java/jaxx/runtime/builder/SelectActionConfig.java 2008-01-21 20:53:22 UTC (rev 183) @@ -0,0 +1,91 @@ +/* +* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin, +* Tony Chemit, Gabriel Landais +* +* 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; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* ##% */ +package jaxx.runtime.builder; + +import jaxx.runtime.JAXXObject; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Pour enregister une action. + * <p/> + * Placer cette annotation sur la classe implantant l'action, + * <p/> + * les informations d�crites seront utilis�es pour instancier l'action + * + * @author chemit + */ +@Retention(RetentionPolicy.RUNTIME) + +@Target(ElementType.TYPE) + +public @interface SelectActionConfig { + + /** + * @return la clef de la commande (doit �tre unique) + * @see javax.swing.Action#ACTION_COMMAND_KEY + */ + public abstract String actionCommand(); + + /** + * @return la clef i18n du texte de l'action, si vide ignor� + * @see javax.swing.Action#NAME + */ + public abstract String name() default ""; + + /** + * @return la clef i18n du tooltip de l'action, si vide ignor� + * @see javax.swing.Action#SHORT_DESCRIPTION + */ + public abstract String shortDescription() default ""; + + /** + * @return la clef i18n du texte de l'action, si vide ignor� + * @see javax.swing.Action#LONG_DESCRIPTION + */ + public abstract String longDescription() default ""; + + /** + * @return + * @see javax.swing.Action#ACCELERATOR_KEY + */ + public abstract String accelerator() default ""; + + /** + * @return la valeur par d�faut pour les component selectable + * @see javax.swing.Action#SELECTED_KEY + */ + public abstract int selectedIndex() default 0; + + /** + * @return + * @see javax.swing.Action#isEnabled() + */ + public abstract boolean enabled() default true; + + /** + * @return la class du container jaxx associ� + * @see javax.swing.Action#NAME + */ + public abstract Class<? extends JAXXObject> container(); + +} \ No newline at end of file Added: trunk/jaxx/src/main/java/jaxx/runtime/builder/TabContentConfig.java =================================================================== --- trunk/jaxx/src/main/java/jaxx/runtime/builder/TabContentConfig.java (rev 0) +++ trunk/jaxx/src/main/java/jaxx/runtime/builder/TabContentConfig.java 2008-01-21 20:53:22 UTC (rev 183) @@ -0,0 +1,46 @@ +/* +* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin, +* Tony Chemit, Gabriel Landais +* +* 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; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* ##% */ +package jaxx.runtime.builder; + +import jaxx.runtime.JAXXObject; + +import javax.swing.JTabbedPane; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Pour enregister un tab + * + * @author chemit + */ +@Retention(RetentionPolicy.RUNTIME) + +@Target(ElementType.FIELD) + +public @interface TabContentConfig { + + Class<? extends JAXXObject> impl(); + + Class<? extends JTabbedPane> parentImpl(); + + boolean useToogle() default false; + +} Added: trunk/jaxx/src/main/java/jaxx/runtime/builder/ToggleActionConfig.java =================================================================== --- trunk/jaxx/src/main/java/jaxx/runtime/builder/ToggleActionConfig.java (rev 0) +++ trunk/jaxx/src/main/java/jaxx/runtime/builder/ToggleActionConfig.java 2008-01-21 20:53:22 UTC (rev 183) @@ -0,0 +1,157 @@ +/* +* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin, +* Tony Chemit, Gabriel Landais +* +* 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; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* ##% */ +package jaxx.runtime.builder; + +import jaxx.runtime.JAXXObject; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Pour enregister une action de type Toggle (ToggleButton). + * <p/> + * Placer cette annotation sur la classe implantant l'action, + * <p/> + * les informations d�crites seront utilis�es pour instancier l'action + * + * @author chemit + */ +@Retention(RetentionPolicy.RUNTIME) + +@Target(ElementType.TYPE) + +public @interface ToggleActionConfig { + /** + * @return la clef de la commande (doit �tre unique) + * @see javax.swing.Action#ACTION_COMMAND_KEY + */ + public abstract String actionCommand(); + + /** + * @return la clef i18n du texte de l'action, si vide ignor� + * @see javax.swing.Action#NAME + */ + public abstract String name() default ""; + + /** + * @return la clef i18n du tooltip de l'action, si vide ignor� + * @see javax.swing.Action#SHORT_DESCRIPTION + */ + public abstract String shortDescription() default ""; + + /** + * @return la clef i18n du texte de l'action, si vide ignor� + * @see javax.swing.Action#LONG_DESCRIPTION + */ + public abstract String longDescription() default ""; + + /** + * @return le nom de l'icone associ�, si vide ignor� + * @see javax.swing.Action#SMALL_ICON + */ + public abstract String smallIcon() default ""; + + /** + * @return le nom du grande icone associ�, si vide ignor� + * @see javax.swing.Action#LARGE_ICON_KEY + */ + public abstract String largeIcon() default ""; + + /** + * @return + * @see javax.swing.Action#ACCELERATOR_KEY + */ + public abstract String accelerator() default ""; + + /** + * @return + * @see javax.swing.Action#MNEMONIC_KEY + */ + public abstract int mnemonic() default '\0'; + + /** + * @return la clef i18n du texte de l'action, si vide ignor� + * @see javax.swing.Action#NAME + */ + public abstract String name2() default ""; + + /** + * @return la clef i18n du tooltip de l'action, si vide ignor� + * @see javax.swing.Action#SHORT_DESCRIPTION + */ + public abstract String shortDescription2() default ""; + + /** + * @return la clef i18n du texte de l'action, si vide ignor� + * @see javax.swing.Action#LONG_DESCRIPTION + */ + public abstract String longDescription2() default ""; + + /** + * @return le nom de l'icone associ�, si vide ignor� + * @see javax.swing.Action#SMALL_ICON + */ + public abstract String smallIcon2() default ""; + + /** + * @return le nom du grande icone associ�, si vide ignor� + * @see javax.swing.Action#LARGE_ICON_KEY + */ + public abstract String largeIcon2() default ""; + + /** + * @return + * @see javax.swing.Action#ACCELERATOR_KEY + */ + public abstract String accelerator2() default ""; + + /** + * @return + * @see javax.swing.Action#MNEMONIC_KEY + */ + public abstract int mnemonic2() default '\0'; + + /** + * @return la valeur par d�faut pour les component selectable + * @see javax.swing.Action#SELECTED_KEY + */ + public abstract boolean selected() default false; + + /** + * @return + * @see javax.swing.Action#isEnabled() + */ + public abstract boolean enabled() default true; + + /** + * @return + * @see javax.swing.Action#isEnabled() + */ + public abstract boolean hideActionText() default false; + + + /** + * @return la class du container jaxx associ� + * @see javax.swing.Action#NAME + */ + public abstract Class<? extends JAXXObject> container(); + +} \ No newline at end of file
participants (1)
-
tchemit@users.labs.libre-entreprise.org