From: Frederic D. <de...@us...> - 2004-06-01 11:28:24
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23809/src/org/fudaa/fudaa/tr/data Modified Files: TrFilleVisu.java TrSiPlanLayer.java TrVisuPanel.java Added Files: MvFindComponentBcPoint.java MvFindActionBcPoint.java Removed Files: TrFindActionBcPoint.java TrBcBoundaryLegendLayer.java TrFindComponent.java TrFindDialog.java TrFindComponentDefault.java TrFindComponentBcPoint.java TrFindActionDefault.java TrFindAction.java Log Message: Index: TrFilleVisu.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/data/TrFilleVisu.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TrFilleVisu.java 5 May 2004 12:42:39 -0000 1.1 --- TrFilleVisu.java 1 Jun 2004 11:27:43 -0000 1.2 *************** *** 17,20 **** --- 17,21 ---- import com.memoire.bu.BuUndoRedoInterface; + import org.fudaa.dodico.commun.DodicoCommandManager; import org.fudaa.ebli.calque.BArbreCalque; import org.fudaa.ebli.calque.BArbreCalqueModel; *************** *** 160,162 **** --- 161,182 ---- } + /** + * @see org.fudaa.fudaa.commun.undo.FudaaUndoCmdMngContainer#clearCmd(org.fudaa.dodico.commun.DodicoCommandManager) + */ + public void clearCmd(DodicoCommandManager _source) { + getVisuPanel().clearCmd(_source); + } + /** + * @see org.fudaa.fudaa.commun.undo.FudaaUndoCmdMngContainer#getCmdMng() + */ + public DodicoCommandManager getCmdMng() { + return getVisuPanel().getCmdMng(); + } + /** + * @see org.fudaa.fudaa.commun.undo.FudaaUndoCmdMngContainer#setActive(boolean) + */ + public void setActive(boolean _b) { + getVisuPanel().setActive(_b); + + } } --- TrFindComponent.java DELETED --- --- TrFindComponentDefault.java DELETED --- --- TrFindComponentBcPoint.java DELETED --- --- TrFindDialog.java DELETED --- Index: TrVisuPanel.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/data/TrVisuPanel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TrVisuPanel.java 5 May 2004 12:42:39 -0000 1.1 --- TrVisuPanel.java 1 Jun 2004 11:27:43 -0000 1.2 *************** *** 9,70 **** package org.fudaa.fudaa.tr.data; - import java.awt.Color; - import java.awt.Component; - import java.awt.Frame; - import java.awt.event.ActionEvent; - import java.awt.event.ActionListener; import java.util.ArrayList; - import java.util.Iterator; import java.util.List; - import java.util.Map; - import java.util.TreeMap; - import javax.swing.Action; - import javax.swing.ActionMap; - import javax.swing.InputMap; - import javax.swing.JCheckBoxMenuItem; - import javax.swing.JColorChooser; - import javax.swing.JComponent; - import javax.swing.JMenu; - import javax.swing.JMenuItem; - import javax.swing.JPopupMenu; - import javax.swing.KeyStroke; - import javax.swing.event.TreeSelectionEvent; - - import com.memoire.bu.BuDialogMessage; - import com.memoire.bu.BuDynamicMenu; - import com.memoire.bu.BuMenu; - import com.memoire.bu.BuPopupMenu; - import com.memoire.bu.BuResource; - - import org.fudaa.dodico.commun.DodicoCommandManager; - import org.fudaa.dodico.ef.EfGrid; - import org.fudaa.ebli.calque.BArbreCalque; - import org.fudaa.ebli.calque.BArbreCalqueModel; - import org.fudaa.ebli.calque.BCalque; - import org.fudaa.ebli.calque.BGroupeCalque; - import org.fudaa.ebli.calque.ZCalqueAffichage; - import org.fudaa.ebli.calque.ZEbliCalquesPanel; - import org.fudaa.ebli.calque.action.EbliActionInterface; - import org.fudaa.ebli.calque.action.EbliComponentFactory; - import org.fudaa.ebli.calque.action.EbliPaletteAction; - import org.fudaa.ebli.palette.BSelecteurReduitFonteNewVersion; import org.fudaa.fudaa.commun.FudaaCommonImplementation; import org.fudaa.fudaa.meshviewer.layer.MvElementLayer; - import org.fudaa.fudaa.meshviewer.layer.MvElementModel; - import org.fudaa.fudaa.meshviewer.layer.MvElementModelDefault; - import org.fudaa.fudaa.meshviewer.layer.MvElementNumberLayer; - import org.fudaa.fudaa.meshviewer.layer.MvElementNumberModelDefault; - import org.fudaa.fudaa.meshviewer.layer.MvGridLayerGroup; - import org.fudaa.fudaa.meshviewer.layer.MvInfoDelegate; - import org.fudaa.fudaa.meshviewer.layer.MvLayer; import org.fudaa.fudaa.meshviewer.layer.MvLayerGroup; import org.fudaa.fudaa.meshviewer.layer.MvNodeLayer; ! import org.fudaa.fudaa.meshviewer.layer.MvNodeModel; ! import org.fudaa.fudaa.meshviewer.layer.MvNodeModelDefault; ! import org.fudaa.fudaa.meshviewer.layer.MvNodeNumberLayer; ! import org.fudaa.fudaa.meshviewer.layer.MvNodeNumberModelDefault; ! import org.fudaa.fudaa.meshviewer.layer.MvPanelInfo; ! import org.fudaa.fudaa.tr.common.TrResource; /** --- 9,25 ---- package org.fudaa.fudaa.tr.data; import java.util.ArrayList; import java.util.List; import org.fudaa.fudaa.commun.FudaaCommonImplementation; + import org.fudaa.fudaa.meshviewer.MvFindAction; + import org.fudaa.fudaa.meshviewer.MvFindActionDefault; + import org.fudaa.fudaa.meshviewer.MvFindDialog; + import org.fudaa.fudaa.meshviewer.MvVisuPanel; import org.fudaa.fudaa.meshviewer.layer.MvElementLayer; import org.fudaa.fudaa.meshviewer.layer.MvLayerGroup; import org.fudaa.fudaa.meshviewer.layer.MvNodeLayer; ! ! import com.memoire.bu.BuMenu; /** *************** *** 73,143 **** */ public abstract class TrVisuPanel ! extends ZEbliCalquesPanel ! implements ActionListener { ! private Map calqueActions_; ! protected FudaaCommonImplementation impl_; ! private DodicoCommandManager mng_; ! protected BuMenu layerMenu_; ! private BuMenu contextTools_; ! private BuMenu ptDisplayTools_; ! private BuMenu eltDisplayTools_; ! protected TrFindDialog findDialog_; ! protected MvPanelInfo pnInfo_; /** * @param _impl l'implementation parente */ public TrVisuPanel(FudaaCommonImplementation _impl) { ! super(null, true, true, true); impl_= _impl; - mng_= new DodicoCommandManager(); - setModeVisible(true); - getVueCalque().setBackground(Color.white); - EbliActionInterface[] temp= standardActionGroup_; - standardActionGroup_= new EbliActionInterface[temp.length + 1]; - System.arraycopy(temp, 0, standardActionGroup_, 0, temp.length); - pnInfo_= new MvPanelInfo(getArbreCalqueModel()); - EbliPaletteAction plAction= - new EbliPaletteAction( - TrResource.getS("Information"), - BuResource.BU.getIcon("commentaire"), - pnInfo_, - "INFOS") { - public void updateBeforeShow() { - BCalque cq= getCalqueActif(); - if (cq != null) - ((MvPanelInfo)getPaletteContent()).updateState(); - } - }; - plAction.setPaletteResizable(true); - standardActionGroup_[temp.length]= plAction; - KeyStroke ks= KeyStroke.getKeyStroke('i'); - plAction.putValue(Action.ACCELERATOR_KEY, ks); - InputMap thisMap= - getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); - ActionMap m= getActionMap(); - thisMap.put(ks, "INFOS"); - m.put("INFOS", plAction); - setFormatSuiviSouris(MvPanelInfo.TWO_DIGITS_FORMAT); - } /** ! * Met a jour le composant d'information */ ! public void updateInfoComponent() { ! pnInfo_.updateState(); } /** ! * Met a jour l'association calque/action ! * @param _c le calque en question ! * @param _act les actions associees a ce calque */ ! public void addCalqueActions(BCalque _c, EbliActionInterface[] _act) { ! if (calqueActions_ == null) ! calqueActions_= new TreeMap(BCalque.createComparator()); ! for (int i= _act.length - 1; i >= 0; i--) { ! if (_act[i] != null) ! _act[i].setEnabled(false); ! } ! calqueActions_.put(_c, _act); } protected void buildFindDialog() { --- 28,53 ---- */ public abstract class TrVisuPanel ! extends MvVisuPanel { ! /** * @param _impl l'implementation parente */ public TrVisuPanel(FudaaCommonImplementation _impl) { ! super(_impl); impl_= _impl; + } + /** ! * @see org.fudaa.fudaa.meshviewer.MvVisuPanel#setSelected(boolean) */ ! protected void setSelected(boolean _b) { ! super.setSelected(_b); } /** ! * @see org.fudaa.fudaa.meshviewer.MvVisuPanel#initLayerMenu(java.lang.String) */ ! protected BuMenu initLayerMenu(String _title) { ! return super.initLayerMenu(_title); } protected void buildFindDialog() { *************** *** 145,216 **** MvNodeLayer lay=getGridGroup().getPointLayer(); if(lay!=null) ! l.add(new TrFindActionDefault(this, lay)); MvElementLayer layEl=getGridGroup().getPolygonLayer(); if(layEl!=null) ! l.add(new TrFindActionDefault(this, layEl)); TrBcPointLayer laybc=getBcPointLayer(); if(laybc!=null) ! l.add(new TrFindActionBcPoint(this, laybc)); ! TrFindAction[] ac=new TrFindAction[l.size()]; l.toArray(ac); ! findDialog_= new TrFindDialog(this, ac); ! } ! protected void majCalqueActions() { ! updateTrLayerMenu(); ! } ! /** ! * @return l'impl parente ! */ ! public FudaaCommonImplementation getImpl() { ! return impl_; ! } ! /** ! * @return le calque legende ! */ ! public TrBcBoundaryLegendLayer getCqLegend() { ! return (TrBcBoundaryLegendLayer)gcDonnees_.getCalqueParNom("cqLegende"); ! } ! /** ! * @return le manager des commandes pour le undo/redo ! */ ! public DodicoCommandManager getCmdMng() { ! return mng_; ! } ! /** ! * Met a jour un arbre avec le modele de ce panneau : A améliorer ! * @param _cq l'arbre calque a mettre a jour ! */ ! public void refreshArbreCalque(BArbreCalque _cq) { ! BArbreCalqueModel arbre= getArbreCalqueModel(); ! _cq.setModel(arbre); ! _cq.refresh(); ! } ! ! /** ! * Ajoute le groupe de calque maillage ! * @param _m le maillage ! * @param _d le delegue pour la mise a jour des infos ! */ ! protected final void addCqMaillage(EfGrid _m, MvInfoDelegate _d) { ! MvNodeModelDefault pt= new MvNodeModelDefault(_m); ! pt.setDelegate(_d); ! MvElementModelDefault elt= new MvElementModelDefault(_m); ! elt.setDelegate(_d); ! addCqMaillage(_m, pt, elt); ! } ! /** ! * @param _m le maillage ! * @param _ptModel le modele a utiliser pour les points ! * @param _eltModel le modele a utiliser pour les elements ! */ ! protected final void addCqMaillage( ! EfGrid _m, ! MvNodeModel _ptModel, ! MvElementModel _eltModel) { ! if (getGridGroup() != null) ! return; ! MvGridLayerGroup cqGrid= new MvGridLayerGroup(_m, _ptModel, _eltModel); ! cqGrid.setName("gpGrid"); ! gcDonnees_.add(cqGrid); } /** --- 55,68 ---- MvNodeLayer lay=getGridGroup().getPointLayer(); if(lay!=null) ! l.add(new MvFindActionDefault(this, lay)); MvElementLayer layEl=getGridGroup().getPolygonLayer(); if(layEl!=null) ! l.add(new MvFindActionDefault(this, layEl)); TrBcPointLayer laybc=getBcPointLayer(); if(laybc!=null) ! l.add(new MvFindActionBcPoint(this, laybc)); ! MvFindAction[] ac=new MvFindAction[l.size()]; l.toArray(ac); ! findDialog_= new MvFindDialog(this, ac); } /** *************** *** 240,308 **** return false; } ! /** ! * Ajoute les calques d'informations : numero des points et des elements ! * @param _g le maillage associe ! */ ! protected final void addCqInfos(EfGrid _g) { ! if (getCqInfos() != null) ! return; ! MvLayerGroup gr= new MvLayerGroup(); ! gr.setName("gpInfo"); ! gr.setTitle(TrResource.getS("infos")); ! TrBcBoundaryLegendLayer l= new TrBcBoundaryLegendLayer(); ! l.setDestructible(false); ! l.setTitle(TrResource.getS("Légende")); ! l.setName("cqLegende"); ! gr.add(l); ! addCqNumber(_g, gr); ! addCqElementNumber(_g, gr); ! gcDonnees_.add(gr); ! } ! /** ! * Action appelee pour mettre a jour les calques d'infos et les mettre en premier ! */ ! public final void updateInfosLayer() { ! MvLayerGroup l= getCqInfos(); ! if (l != null) ! gcDonnees_.enPremier(l); ! } ! /** ! * @return le groupe de calque d'info ! */ ! public MvLayerGroup getCqInfos() { ! return (MvLayerGroup)gcDonnees_.getCalqueParNom("gpInfo"); ! } ! /** ! * @param _g le maillage associee ! * @param _c le groupe de calque de dest ! */ ! private final void addCqNumber(EfGrid _g, BGroupeCalque _c) { ! if (getCqNumber() == null) { ! MvNodeNumberLayer pt= ! new MvNodeNumberLayer(new MvNodeNumberModelDefault(_g)); ! pt.setName("cqPtNumber"); ! _c.add(pt); ! } ! } ! private final void addCqElementNumber(EfGrid _g, BGroupeCalque _c) { ! if (getCqNumber() == null) { ! MvElementNumberLayer pt= ! new MvElementNumberLayer(new MvElementNumberModelDefault(_g)); ! pt.setName("cqEltNumber"); ! _c.add(pt); ! } ! } ! /** ! * @return le calque affichant les numeros des points ! */ ! public final MvNodeNumberLayer getCqNumber() { ! return (MvNodeNumberLayer)gcDonnees_.getCalqueParNom("cqPtNumber"); ! } ! /** ! * @return le calque affichant les numeros des elements ! */ ! public final MvElementNumberLayer getCqElementNumber() { ! return (MvElementNumberLayer)gcDonnees_.getCalqueParNom("cqEltNumber"); ! } /** * @param b le nouveau groupe des calques des conditions limites --- 92,96 ---- return false; } ! /** * @param b le nouveau groupe des calques des conditions limites *************** *** 340,349 **** return (TrBcLayerGroup)gcDonnees_.getCalqueParNom("gpCl"); } ! /** ! * @return le groupe maillage ! */ ! public MvGridLayerGroup getGridGroup() { ! return (MvGridLayerGroup)gcDonnees_.getCalqueParNom("gpGrid"); ! } /** * @return la calque points limites --- 128,132 ---- return (TrBcLayerGroup)gcDonnees_.getCalqueParNom("gpCl"); } ! /** * @return la calque points limites *************** *** 359,745 **** return getBoundaryGroup().getBcBoundaryLayer(); } - /** - * @return la fenetre de l'implementation parente. - */ - public Frame getFrame() { - return getImpl().getFrame(); - } - /** - * Remplit un menu avec les actions associees aux calques. - * @param _projectMenu le menu a remplir - */ - public void fillWithAllLayersAction(JMenu _projectMenu) { - if (calqueActions_ != null) { - for (Iterator it= calqueActions_.entrySet().iterator(); it.hasNext();) { - Map.Entry e= (Map.Entry)it.next(); - EbliActionInterface[] ac= (EbliActionInterface[])e.getValue(); - if ((ac != null) && (ac.length > 0)) { - BCalque cq= (BCalque)e.getKey(); - BuMenu m= new BuMenu(cq.getTitle(), cq.getName()); - fillMenuWith(m, ac); - _projectMenu.add(m); - } - } - } - } - protected void fillMenuWith(JPopupMenu _m, EbliActionInterface[] _ac) { - if (_ac == null) - return; - int nAc= _ac.length; - for (int j= 0; j < nAc; j++) { - if (_ac[j] == null) - _m.addSeparator(); - else - _m.add(_ac[j].buildMenuItem(EbliComponentFactory.INSTANCE)); - } - } - protected void fillMenuWith(JMenu _m, EbliActionInterface[] _ac) { - if (_ac == null) - return; - int nAc= _ac.length; - for (int j= 0; j < nAc; j++) { - if (_ac[j] == null) - _m.addSeparator(); - else - _m.add(_ac[j].buildMenuItem(EbliComponentFactory.INSTANCE)); - } - } - /** - * Rempli le menu popup avec les actions du calque en question - * @param _m le menu a remplir - * @param _c le calque dont les actions seront ajoutees au menu - */ - public void fillMenuWithCalqueActions(JPopupMenu _m, BCalque _c) { - if (calqueActions_ != null) - fillMenuWith(_m, (EbliActionInterface[])calqueActions_.get(_c)); - } - /** - * Rempli le menu avec les actions du calque en question - * @param _m le menu a remplir - * @param _c le calque dont les actions seront ajoutees au menu - */ - public void fillMenuWithCalqueActions(JMenu _m, BCalque _c) { - if (calqueActions_ != null) - fillMenuWith(_m, (EbliActionInterface[])calqueActions_.get(_c)); - } - /** - * @param _ac les actions dont l'etat "enable" sera modifie - * @param _b la nouvelle valeur - */ - protected static void setActionEnable(Action[] _ac, boolean _b) { - if ((_ac != null) && (_ac.length > 0)) { - for (int i= _ac.length - 1; i >= 0; i--) { - if (_ac[i] != null) - _ac[i].setEnabled(_b); - } - } - } - private void setCalqueActionActif(BCalque c, boolean _b) { - if ((calqueActions_ != null) && (c != null)) { - setActionEnable((EbliActionInterface[])calqueActions_.get(c), _b); - } - } - /** - * @see javax.swing.event.TreeSelectionListener#valueChanged(javax.swing.event.TreeSelectionEvent) - */ - public void valueChanged(TreeSelectionEvent _evt) { - setCalqueActionActif(getCalqueActif(), false); - super.valueChanged(_evt); - setCalqueActionActif(getCalqueActif(), true); - } - - - /** - * L'action refaire - */ - public void redo() { - mng_.redo(); - } - /** - * L'action defaire. - */ - public void undo() { - mng_.undo(); - } - - /** - * Met a jour le menu "layer" et les actions du calque actif - * @param b la nouvelle valeur - */ - protected void setSelected(boolean b) { - if (layerMenu_ != null) - layerMenu_.setEnabled(b); - BCalque cq= getCalqueActif(); - if (cq != null) { - setCalqueActionActif(cq, b); - } - } - - - private void buildTools() { - contextTools_= new BuMenu(TrResource.TR.getString("Outils"), "TOOLS"); - fillMenuWithToolsActions(contextTools_); - } - /** - * @see org.fudaa.ebli.calque.BCalqueContextuelListener#getCmdsContextuelles() - */ - public BuPopupMenu getCmdsContextuelles() { - BCalque cqActif= getCalqueActif(); - BuPopupMenu r= new BuPopupMenu(); - if (cqActif != null) { - fillMenuWithCalqueActions(r, cqActif); - } - if (contextTools_ == null) - buildTools(); - r.add(contextTools_); - if (ptDisplayTools_ == null) { - ptDisplayTools_= new DisplayMenu(); - } - r.add(ptDisplayTools_); - if (eltDisplayTools_ == null) { - eltDisplayTools_= new DisplayElementMenu(); - } - r.add(eltDisplayTools_); - return r; - } - /** - * Met a jour le menu de la frame - */ - protected void fillTrLayerMenu() { - fillWithAllLayersAction(layerMenu_); - } - - private final void buildTrLayerMenu() { - super.fillSpecificMenu(layerMenu_); - layerMenu_.addSeparator(); - layerMenu_.add(getPointNumberDisplayMenu()); - layerMenu_.add(getElementNumberDisplayMenu()); - fillTrLayerMenu(); - } - protected void updateTrLayerMenu() { - if (layerMenu_ != null) { - layerMenu_.removeAll(); - buildTrLayerMenu(); - } - } - - protected BuMenu initLayerMenu(String _title) { - if (layerMenu_ == null) { - layerMenu_= new BuMenu(_title, "LAYER"); - buildTrLayerMenu(); - } - return layerMenu_; - } - - /** - * @return le menu principal - */ - public BuMenu getLayerMenu() { - return layerMenu_; - } - /** - * @return le menu pour l'affichage des numero - */ - public final JMenu getPointNumberDisplayMenu() { - return new DisplayMenu(); - } - /** - * @return le menu pour l'affichage des numero - */ - public final JMenu getElementNumberDisplayMenu() { - return new DisplayElementMenu(); - } - private class DisplayMenu extends BuDynamicMenu { - JMenuItem addPt_; - JMenuItem allPt_; - JMenuItem clearPt_; - JCheckBoxMenuItem boundaryIdxPt_; - /** - * Numero des points - */ - public DisplayMenu() { - super(TrResource.getS("Numéros des points"), "DISPLAY_POINTS_INDEX"); - setIcon(TrResource.TR.getIcon("numnoeuds")); - } - /** - * - */ - protected void build() { - if (addPt_ == null) { - addPt_= - addMenuItem( - TrResource.getS("Afficher les numéros des points sélectionnés"), - "DISPLAY_INDEX_SELECTED_POINT"); - addPt_.addActionListener(TrVisuPanel.this); - allPt_= - addMenuItem( - TrResource.getS("Afficher tous les numéros"), - "DISPLAY_INDEX_ALL_POINT"); - allPt_.addActionListener(TrVisuPanel.this); - clearPt_= - addMenuItem( - TrResource.getS("Ne plus afficher les numéros"), - "DISPLAY_NONE_INDEX_POINT"); - clearPt_.addActionListener(TrVisuPanel.this); - boundaryIdxPt_= - addCheckBox( - TrResource.getS("Afficher les numéros sur la frontière"), - "DISPLAY_BOUNDARY_INDEX_POINT", - true, - false); - boundaryIdxPt_.addActionListener(TrVisuPanel.this); - addSeparator(); - addMenuItem( - TrResource.getS("Modifier la fonte"), - "DISPLAY_INDEX_PT_FONT").addActionListener( - TrVisuPanel.this); - addMenuItem( - TrResource.getS("Modifier la couleur"), - "DISPLAY_INDEX_PT_COLOR").addActionListener( - TrVisuPanel.this); - } - MvNodeNumberLayer pt= TrVisuPanel.this.getCqNumber(); - allPt_.setEnabled(!pt.isAll()); - boundaryIdxPt_.setSelected(pt.isFrontierIdxShown()); - clearPt_.setEnabled(!pt.isPtToDisplayEmpty()); - MvLayer layer= (MvLayer)TrVisuPanel.this.getCalqueActif(); - boolean act= ((layer != null) && (!layer.isSelectionPointEmpty())); - addPt_.setEnabled(act); - } - /** - * - */ - protected boolean isActive() { - return true; - } - } - private class DisplayElementMenu extends BuDynamicMenu { - JMenuItem addElt_; - JMenuItem allElt_; - JMenuItem clearElt_; - /** - * Numero des elements - */ - public DisplayElementMenu() { - super(TrResource.getS("Numéros des éléments"), "DISPLAY_ELEMENTS_INDEX"); - setIcon(TrResource.TR.getIcon("numelements")); - } - /** - * - */ - protected void build() { - if (addElt_ == null) { - addElt_= - addMenuItem( - TrResource.getS("Afficher les numéros des éléments sélectionnés"), - "DISPLAY_INDEX_SELECTED_ELEMENT"); - addElt_.addActionListener(TrVisuPanel.this); - allElt_= - addMenuItem( - TrResource.getS("Afficher tous les numéros"), - "DISPLAY_INDEX_ALL_ELEMENT"); - allElt_.addActionListener(TrVisuPanel.this); - clearElt_= - addMenuItem( - TrResource.getS("Ne plus afficher les numéros"), - "DISPLAY_NONE_INDEX_ELEMENT"); - clearElt_.addActionListener(TrVisuPanel.this); - addSeparator(); - addMenuItem( - TrResource.getS("Modifier la fonte"), - "DISPLAY_INDEX_ELEMENT_FONT").addActionListener( - TrVisuPanel.this); - addMenuItem( - TrResource.getS("Modifier la couleur"), - "DISPLAY_INDEX_ELEMENT_COLOR").addActionListener( - TrVisuPanel.this); - } - MvElementNumberLayer pt= TrVisuPanel.this.getCqElementNumber(); - allElt_.setEnabled(!pt.isAll()); - clearElt_.setEnabled(!pt.isPtToDisplayEmpty()); - MvLayer layer= (MvLayer)TrVisuPanel.this.getCalqueActif(); - boolean act= ((layer != null) && (!layer.isSelectionElementEmpty())); - addElt_.setEnabled(act); - } - - protected boolean isActive() { - return true; - } - } - private void fontChange(String _titre, Component _c) { - BSelecteurReduitFonteNewVersion s= - new BSelecteurReduitFonteNewVersion(_c.getFont()); - s.setTarget(_c); - BuDialogMessage m= new BuDialogMessage(null, null, s); - m.setTitle(_titre); - m.setModal(false); - m.activate(); - } - private void colorChange(String _titre, ZCalqueAffichage _c) { - Color fg= - JColorChooser.showDialog(TrVisuPanel.this, _titre, _c.getForeground()); - if (fg != null) - _c.setForeground(fg); - } - - /** - * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent) - */ - public void actionPerformed(ActionEvent e) { - String com= e.getActionCommand(); - if ("DISPLAY_INDEX_SELECTED_POINT".equals(com)) { - MvLayer l= (MvLayer)getCalqueActif(); - if ((l != null) && (!l.isSelectionPointEmpty())) { - getCqNumber().setSelectedPoint(l.getPtIdx()); - } - } else if ("DISPLAY_INDEX_ALL_POINT".equals(com)) { - getCqNumber().setAll(true); - } else if ("DISPLAY_NONE_INDEX_POINT".equals(com)) { - getCqNumber().clearPtIdxShow(); - } else if ("DISPLAY_BOUNDARY_INDEX_POINT".equals(com)) { - getCqNumber().changeFrontierIdxShownState(); - } else if ("DISPLAY_INDEX_PT_FONT".equals(com)) { - fontChange( - TrResource.getS("Numéros des points: Modifier la fonte"), - getCqNumber()); - } else if ("DISPLAY_INDEX_PT_COLOR".equals(com)) { - colorChange( - TrResource.getS("Numéros des points: Modifier la couleur"), - getCqNumber()); - } else if ("DISPLAY_INDEX_SELECTED_ELEMENT".equals(com)) { - MvLayer l= (MvLayer)getCalqueActif(); - if ((l != null) && (!l.isSelectionElementEmpty())) { - getCqElementNumber().setSelectedElement(l.getElementIdx()); - } - } else if ("DISPLAY_INDEX_ALL_ELEMENT".equals(com)) { - getCqElementNumber().setAll(true); - } else if ("DISPLAY_NONE_INDEX_ELEMENT".equals(com)) { - getCqElementNumber().clearEltIdxShow(); - } else if ("DISPLAY_INDEX_ELEMENT_FONT".equals(com)) { - fontChange( - TrResource.getS("Numéros des éléments: Modifier la fonte"), - getCqElementNumber()); - } else if ("DISPLAY_INDEX_ELEMENT_COLOR".equals(com)) { - colorChange( - TrResource.getS("Numéros des éléments: Modifier la couleur"), - getCqElementNumber()); - } - } - /** - * - */ - public void find() { - if (findDialog_ == null) - buildFindDialog(); - findDialog_.affiche(getFrame()); - } - /** - * - */ - public void replace() {} - /** - * - */ - public void select() {} } --- 142,145 ---- --- TrFindAction.java DELETED --- Index: TrSiPlanLayer.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/data/TrSiPlanLayer.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TrSiPlanLayer.java 5 May 2004 12:42:39 -0000 1.2 --- TrSiPlanLayer.java 1 Jun 2004 11:27:43 -0000 1.3 *************** *** 10,13 **** --- 10,14 ---- import java.awt.Color; + import org.fudaa.ctulu.CtuluLib; import org.fudaa.ebli.calque.ZCalquePoint; *************** *** 16,20 **** import org.fudaa.ebli.geometrie.GrPoint; import org.fudaa.ebli.trace.TraceIcone; - import org.fudaa.fudaa.meshviewer.MvPanelViewer; import org.fudaa.fudaa.meshviewer.layer.MvLayer; import org.fudaa.fudaa.meshviewer.layer.MvPanelInfo; --- 17,20 ---- --- NEW FILE: MvFindActionBcPoint.java --- (This appears to be a binary file; contents omitted.) --- TrFindActionBcPoint.java DELETED --- --- TrBcBoundaryLegendLayer.java DELETED --- --- TrFindActionDefault.java DELETED --- --- NEW FILE: MvFindComponentBcPoint.java --- (This appears to be a binary file; contents omitted.) |