/*
* Copyright (C) 2011-2014 GeoForge Project
*
* This program 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 3 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.geoforge.guillc.treenode;
import org.geoforge.guillc.handler.IGfrHandlerRenamerChildNode;
import java.awt.event.ActionListener;
import java.util.Observable;
import javax.swing.ImageIcon;
import org.geoforge.guillc.handler.IGfrHandlerDisplayableObjectsSetTloSpaceWork;
import org.geoforge.guillc.tree.GfrTreAbs;
import org.geoforge.mdldat.event.GfrEvtMdlIdDatRenamedTlo;
/**
*
* @author robert
*/
abstract public class GfrNodCtrMovLeafWrkLblTloAbs extends GfrNodCtrMovLeafAbs
{
protected GfrNodCtrMovLeafWrkLblTloAbs(
ActionListener alrControllerSpcPrj,
String strId,
String userObject,
IGfrHandlerDisplayableObjectsSetTloSpaceWork enuValueKindObjectTlo,
GfrTreAbs tre)
{
super(alrControllerSpcPrj,
strId,
userObject,
enuValueKindObjectTlo.getSmallImageIconItemDisplayableObjectsSet(),
tre);
}
@Override
public void update(Observable obs, Object objEvt)
{
if (objEvt instanceof GfrEvtMdlIdDatRenamedTlo)
{
GfrEvtMdlIdDatRenamedTlo evt = (GfrEvtMdlIdDatRenamedTlo) objEvt;
String strId = evt.getId();
if (strId.compareTo(super._strId) != 0)
return;
((IGfrHandlerRenamerChildNode) super.getParent()).renameChildNode(this, evt.getValueNew());
return;
}
}
}