KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jac > aspects > gui > HandlerResult


1 /*
2   Copyright (C) 2002 Renaud Pawlak, Laurent Martelli
3   
4   This program is free software; you can redistribute it and/or modify
5   it under the terms of the GNU Lesser General Public License as
6   published by the Free Software Foundation; either version 2 of the
7   License, or (at your option) any later version.
8
9   This program is distributed in the hope that it will be useful, but
10   WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12   Lesser General Public License for more details.
13
14   You should have received a copy of the GNU Lesser General Public
15   License along with this program; if not, write to the Free Software
16   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
17   USA */

18
19 package org.objectweb.jac.aspects.gui;
20
21 import org.objectweb.jac.core.rtti.FieldItem;
22 import org.objectweb.jac.core.rtti.ClassRepository;
23
24 /**
25  * A handler that is assigned to a selection event (in order to change
26  * its result in most cases). */

27
28 public class HandlerResult {
29    public Object JavaDoc object;
30    public FieldItem field;
31    public FieldItem container;
32    public Object JavaDoc extraOption;
33    public CustomizedView target;
34
35    /**
36     * Constructs a new handler.
37     *
38     * @param container field the object is part of
39     * @param object the object that holds the selected field
40     * @param fieldname name of the field to select (may be null)
41     * @param extraOption extra info (may be null) */

42    public HandlerResult(CustomizedView target,
43                         FieldItem container,Object JavaDoc object, String JavaDoc fieldname,
44                         Object JavaDoc extraOption) {
45       this.target = target;
46       this.container = container;
47       this.object = object;
48       if (fieldname!=null)
49          this.field =
50             ClassRepository.get().getClass(object).getField(fieldname);
51       this.extraOption = extraOption;
52    }
53 }
54
Popular Tags