01: /*
02: * Copyright 2004 JETA Software, Inc. All rights reserved.
03: * JETA SOFTWARE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
04: */
05:
06: package com.jeta.swingbuilder.gui.components.list;
07:
08: import java.awt.event.ActionEvent;
09: import java.awt.event.ActionListener;
10:
11: import com.jeta.forms.store.properties.IconProperty;
12: import com.jeta.open.gui.framework.JETAController;
13: import com.jeta.swingbuilder.gui.images.ImageUtils;
14:
15: public class ListItemController extends JETAController {
16: private ListItemView m_view;
17:
18: public ListItemController(ListItemView view) {
19: super (view);
20: m_view = view;
21:
22: assignAction(ListItemNames.ID_ICON_BTN, new SetIconAction());
23: }
24:
25: public class SetIconAction implements ActionListener {
26: public void actionPerformed(ActionEvent evt) {
27: String path = null;
28: IconProperty iprop = m_view.getIconProperty();
29: if (ImageUtils.chooseImageFile(m_view, iprop)) {
30: m_view.setIconProperty(iprop);
31: }
32: }
33: }
34: }
|