|
From: <de...@us...> - 2012-09-04 21:10:24
|
Revision: 7606
http://fudaa.svn.sourceforge.net/fudaa/?rev=7606&view=rev
Author: deniger
Date: 2012-09-04 21:10:18 +0000 (Tue, 04 Sep 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGConfigureActionPalette.java
trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGFillePanel.java
trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGTreeCellRenderer.java
Added Paths:
-----------
trunk/framework/ctulu-ui/nbactions.xml
Added: trunk/framework/ctulu-ui/nbactions.xml
===================================================================
--- trunk/framework/ctulu-ui/nbactions.xml (rev 0)
+++ trunk/framework/ctulu-ui/nbactions.xml 2012-09-04 21:10:18 UTC (rev 7606)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<actions>
+ <action>
+ <actionName>CUSTOM-deploy</actionName>
+ <displayName>deploy</displayName>
+ <goals>
+ <goal>deploy</goal>
+ </goals>
+ </action>
+ </actions>
Modified: trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGConfigureActionPalette.java
===================================================================
--- trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGConfigureActionPalette.java 2012-09-04 09:13:04 UTC (rev 7605)
+++ trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGConfigureActionPalette.java 2012-09-04 21:10:18 UTC (rev 7606)
@@ -11,6 +11,7 @@
*/
package org.fudaa.ebli.courbe;
+import javax.swing.Action;
import javax.swing.event.ListSelectionEvent;
import org.fudaa.ebli.commun.EbliLib;
Modified: trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGFillePanel.java
===================================================================
--- trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGFillePanel.java 2012-09-04 09:13:04 UTC (rev 7605)
+++ trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGFillePanel.java 2012-09-04 21:10:18 UTC (rev 7606)
@@ -56,16 +56,12 @@
* @version $Id: EGFillePanel.java,v 1.32 2007-05-22 14:19:04 deniger Exp $
*/
public class EGFillePanel extends BuPanel implements PropertyChangeListener, ActionListener, CtuluSelectionInterface,
- CtuluImageProducer {
+ CtuluImageProducer {
protected final EGVue vue_;
-
JLabel lbTools_;
-
EbliActionInterface[] personnalAction_;
-
final protected EGInteractionSelection selection_;
-
EbliActionInterface[] specificTools_;
/**
@@ -115,7 +111,6 @@
// public JComponent getInfoPanel() {
// return suiviInfos_.getTableInfos();
// }
-
protected EbliActionInterface[] buildActions() {
final List r = new ArrayList(8);
final List actionForGroup = new ArrayList(5);
@@ -123,7 +118,7 @@
vue_.graphe_.addKeyListener(selection_);
vue_.addInteractiveCmp(selection_);
EGActionInteraction a = new EGActionInteraction(EbliResource.EBLI.getString("S\xE9lection ponctuelle"),
- EbliResource.EBLI.getIcon("fleche"), "SELECT", selection_);
+ EbliResource.EBLI.getIcon("fleche"), "SELECT", selection_);
a.putValue(Action.SHORT_DESCRIPTION, EbliResource.EBLI.getString("S\xE9lectionner des points"));
a.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke('s'));
r.add(a);
@@ -131,8 +126,7 @@
actionForGroup.add(a);
EbliActionAbstract s = new EbliActionSimple(EbliResource.EBLI.getString("Restaurer"), EbliResource.EBLI
- .getIcon("restore"), "RESTORE") {
-
+ .getIcon("restore"), "RESTORE") {
public void actionPerformed(ActionEvent _e) {
vue_.getGraphe().restore();
}
@@ -142,13 +136,13 @@
s.putValue(EbliActionInterface.SECOND_KEYSTROKE, KeyStroke.getKeyStroke(KeyEvent.VK_F5, 0));
r.add(s);
s = new EbliActionChangeState(EbliLib.getS("Restaurer automatiquement"), EbliResource.EBLI.getIcon("restoreauto"),
- "AUTO_REST") {
+ "AUTO_REST") {
public void changeAction() {
getGraphe().setAutoRestore(isSelected());
}
};
// EM:Si la fonctionnalit\xE9 'Restaurer automatiquement' est d\xE9j\xE0 activ\xE9e, selectionner l'action.
- ((EbliActionChangeState)s).setSelected(getGraphe().isAutoRestore());
+ ((EbliActionChangeState) s).setSelected(getGraphe().isAutoRestore());
//
s.putValue(Action.SHORT_DESCRIPTION, EbliLib.getS("Restaurer automatiquement la vue"));
r.add(s);
@@ -192,7 +186,7 @@
final EGInteractionDeplacementPoint pt = new EGInteractionDeplacementPoint(this);
vue_.addInteractiveCmp(pt);
a = new EGActionInteraction(EbliResource.EBLI.getString("D\xE9placer un point"), EbliResource.EBLI
- .getIcon("node-move-hand"), "MOVE_POINT", pt);
+ .getIcon("node-move-hand"), "MOVE_POINT", pt);
a.putValue(Action.SHORT_DESCRIPTION, EbliResource.EBLI.getString("D\xE9placer le point s\xE9lectionn\xE9"));
r.add(a);
pt.addPropertyChangeListener(this);
@@ -206,18 +200,16 @@
}
// r.add(new EGConfigureActionPalette(vue_.graphe_.getModel()));
- r.add(new EbliActionSimple(EbliLib.getS("Configuration"), BuResource.BU.getToolIcon("configurer"), "CONFIGURE") {
+ r.add(new EbliActionSimple(EbliLib.getS("Configurer les courbes"), BuResource.BU.getToolIcon("configurer"), "CONFIGURE") {
public void actionPerformed(ActionEvent _e) {
EGPaletteLegendeGraphe palette = new EGPaletteLegendeGraphe(getGraphe());
palette.setPreferredSize(new Dimension(500, 600));
palette.afficheModale(CtuluLibSwing.getFrameAncestor(EGFillePanel.this));
}
-
});
final BPaletteInfoAbstractAction info = new BPaletteInfoAbstractAction() {
-
public JComponent buildContentPane() {
return new EGPaletteInfo(EGFillePanel.this, null);
}
@@ -243,8 +235,7 @@
if (getModel().canAddCourbe()) {
r.add(null);
final EbliActionSimple addAction = new EbliActionSimple(EbliLib.getS("Ajouter une courbe"), BuResource.BU
- .getToolIcon("creer"), "NEW_CURVE") {
-
+ .getToolIcon("creer"), "NEW_CURVE") {
public void actionPerformed(ActionEvent _e) {
getModel().addNewCourbe(vue_.graphe_.getCmd(), EGFillePanel.this, EGFillePanel.this.getGraphe());
vue_.graphe_.restore();
@@ -252,7 +243,7 @@
};
getModel().decoreAddButton(addAction);
addAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_M, InputEvent.CTRL_DOWN_MASK
- | InputEvent.SHIFT_DOWN_MASK));
+ | InputEvent.SHIFT_DOWN_MASK));
r.add(addAction);
}
@@ -290,7 +281,6 @@
}
protected void fillPopupMenu(final BuPopupMenu _menu) {
-
}
public void popupMenu(final int _x, final int _y) {
@@ -300,21 +290,21 @@
boolean actif = false;
final EGCourbe c = vue_.graphe_.getSelectedComponent();
final boolean cModifiable = (c != null) && (c.getModel().isModifiable()) && (getSelection() != null)
- && (!getSelection().isEmpty());
+ && (!getSelection().isEmpty());
m.addMenuItem(EbliLib.getS("Modifier les points s\xE9lectionn\xE9s"), "MODIFY_POINTS", EbliResource.EBLI
- .getToolIcon("node-edit"), cModifiable)/* .addActionListener(this) */;
+ .getToolIcon("node-edit"), cModifiable)/* .addActionListener(this) */;
actif = cModifiable && (getSelection().getNbSelectedIndex() >= 2);
m.addMenuItem(EbliLib.getS("Aligner les points"), "ALIGN_POINTS", EbliResource.EBLI.getToolIcon("node-corner"),
- actif)/* .addActionListener(this) */;
+ actif)/* .addActionListener(this) */;
actif = c != null && c.getModel().isModifiable() && c.getModel().isXModifiable()
- && (getSelection().getNbSelectedIndex() >= 2);
+ && (getSelection().getNbSelectedIndex() >= 2);
m.addMenuItem(EbliLib.getS("Raffiner"), "ADD_POINTS", EbliResource.EBLI.getToolIcon("node-add"), actif)/*
- * .addActionListener
- * (this)
- */;
+ * .addActionListener
+ * (this)
+ */;
actif = c != null && cModifiable && c.getModel().isXModifiable() && c.getModel().getNbValues() > 2;
m.addMenuItem(EbliLib.getS("Supprimer un point"), "REMOVE_POINTS", EbliResource.EBLI.getToolIcon("node-delete"),
- actif)/* .addActionListener(this) */;
+ actif)/* .addActionListener(this) */;
m.add(new BuSeparator());
fillSpecificMenu(m);
m.show(this, _x, _y);
@@ -327,7 +317,7 @@
final String c = _evt.getActionCommand();
if ("MODIFY_POINTS".equals(c)) {
EGTransfoLib.modifier(vue_.graphe_, getCourbeSelected(), getSelection().getSelectedIndex(), vue_.getGraphe()
- .getCmd());
+ .getCmd());
} else if ("ALIGN_POINTS".equals(c)) {
final EGCourbe courbe = getCourbeSelected();
if (courbe != null) {
@@ -340,7 +330,7 @@
final CtuluListSelectionInterface i = getSelection();
if ((i != null) && (i.getNbSelectedIndex() >= 2)) {
EGTransfoLib.ajouterPoint(vue_.graphe_, getCourbeSelected(), i.getMinIndex(), i.getMaxIndex(), vue_.getGraphe()
- .getCmd());
+ .getCmd());
}
} else if ("REMOVE_POINTS".equals(c)) {
final EGCourbe courbe = getCourbeSelected();
@@ -358,7 +348,9 @@
*/
public void fillSpecificMenu(final JMenu _m) {
final EbliActionInterface[] ac = getSpecificActions();
- if (ac == null) { return; }
+ if (ac == null) {
+ return;
+ }
final int n = ac.length;
for (int i = 0; i < n; i++) {
final EbliActionInterface a = ac[i];
@@ -375,7 +367,9 @@
*/
public void fillSpecificMenu(final JPopupMenu _popup) {
final EbliActionInterface[] ac = getSpecificActions();
- if (ac == null) { return; }
+ if (ac == null) {
+ return;
+ }
final int n = ac.length;
for (int i = 0; i < n; i++) {
final EbliActionInterface a = ac[i];
@@ -387,7 +381,8 @@
}
}
- public void find() {}
+ public void find() {
+ }
/**
* @return la taille de l'image generee par defaut par ce composant
@@ -438,7 +433,8 @@
}
}
- public void replace() {}
+ public void replace() {
+ }
public void select() {
selection_.selectAll();
@@ -446,7 +442,7 @@
/**
* Les outils seront reconstruits avec les nouvelles actions suppl\xE9mentaires.
- *
+ *
* @param _a nouvelles actions a ajouter.
*/
public final void setPersonnalAction(final EbliActionInterface[] _a) {
@@ -455,5 +451,4 @@
}
personnalAction_ = _a;
}
-
}
\ No newline at end of file
Modified: trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGTreeCellRenderer.java
===================================================================
--- trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGTreeCellRenderer.java 2012-09-04 09:13:04 UTC (rev 7605)
+++ trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGTreeCellRenderer.java 2012-09-04 21:10:18 UTC (rev 7606)
@@ -56,6 +56,7 @@
}
public static class AxeChooserRenderer extends EGTreeCellRenderer {
+
final EGAxeVertical vert_;
public AxeChooserRenderer(final EGAxeVertical _vert) {
@@ -86,9 +87,7 @@
}
}
}
-
}
-
JTextField r1_;
JLabel r2_;
JLabel r3_;
@@ -101,7 +100,6 @@
public EGTreeCellRenderer(final boolean _isList) {
r1_ = new BuTextField() {
-
public void setUI(final TextUI _ui) {
super.setUI(_ui);
setBorder(null);
@@ -137,10 +135,10 @@
}
public Component getTableCellRendererComponent(final JTable _table, final Object _value, final boolean _isSelected,
- final boolean _hasFocus, final int _row, final int _column) {
+ final boolean _hasFocus, final int _row, final int _column) {
updateComponent(_table.getFont(), UIManager.getColor("Table.foreground"), UIManager.getColor("Table.background"),
- UIManager.getColor("Table.selectionForeground"), UIManager.getColor("Table.selectionBackground"), _value,
- _isSelected);
+ UIManager.getColor("Table.selectionForeground"), UIManager.getColor("Table.selectionBackground"), _value,
+ _isSelected);
if (_column == 0) {
return r3_;
}
@@ -151,8 +149,13 @@
}
public void updateComponent(final Font _f, final Color _foregroundColor, final Color _backGroundColor,
- final Color _selectionColor, final Color _selectionBackGroungColor, final Object _value, final boolean _selected) {
+ final Color _selectionColor, final Color _selectionBackGroungColor, final Object _value, final boolean _selected) {
startUpdateComponent();
+ if (_value == null) {
+ r1_.setText(CtuluLibString.EMPTY_STRING);
+ r1_.setToolTipText(CtuluLibString.EMPTY_STRING);
+ return;
+ }
r1_.setText(_value.toString());
r1_.setToolTipText(_value.toString());
r1_.setFont(_f);
@@ -217,17 +220,18 @@
finishUpdateComponent(_value);
}
- protected void startUpdateComponent() {}
+ protected void startUpdateComponent() {
+ }
- protected void finishUpdateComponent(final Object _value) {}
+ protected void finishUpdateComponent(final Object _value) {
+ }
public Component getListCellRendererComponent(final JList _list, final Object _value, final int _index,
- final boolean _isSelected, final boolean _cellHasFocus) {
+ final boolean _isSelected, final boolean _cellHasFocus) {
updateComponent(_list.getFont(), _list.getForeground(), _list.getBackground(), _list.getSelectionForeground(),
- _list.getSelectionBackground(), _value, _isSelected);
+ _list.getSelectionBackground(), _value, _isSelected);
return this;
}
-
Color treeSelectionForeground_;
Color treeSelectionBackground_;
@@ -240,11 +244,11 @@
}
updateComponent(_tree.getFont(), _tree.getForeground(), _tree.getBackground(), treeSelectionForeground_,
- treeSelectionBackground_, _value, _selected);
+ treeSelectionBackground_, _value, _selected);
}
public Component getTreeCellRendererComponent(final JTree _tree, final Object _value, final boolean _selected,
- final boolean _expanded, final boolean _leaf, final int _row, final boolean _hasFocus) {
+ final boolean _expanded, final boolean _leaf, final int _row, final boolean _hasFocus) {
updateTreeCellRenderer(_tree, _value, _selected);
return this;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|