01: package org.drools.brms.client.modeldriven.ui;
02:
03: /*
04: * Copyright 2005 JBoss Inc
05: *
06: * Licensed under the Apache License, Version 2.0 (the "License");
07: * you may not use this file except in compliance with the License.
08: * You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing, software
13: * distributed under the License is distributed on an "AS IS" BASIS,
14: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
17: */
18:
19: import org.drools.brms.client.common.Lbl;
20: import org.drools.brms.client.modeldriven.HumanReadable;
21: import org.drools.brms.client.modeldriven.SuggestionCompletionEngine;
22: import org.drools.brms.client.modeldriven.brl.ActionRetractFact;
23:
24: import com.google.gwt.user.client.ui.Composite;
25: import com.google.gwt.user.client.ui.FlexTable;
26:
27: /**
28: * This is used when you want to retract a fact. It will provide a list of
29: * bound facts for you to retract.
30: * @author Michael Neale
31: */
32: public class ActionRetractFactWidget extends Composite {
33:
34: private FlexTable layout;
35:
36: public ActionRetractFactWidget(SuggestionCompletionEngine com,
37: ActionRetractFact model) {
38: layout = new FlexTable();
39:
40: layout.setStyleName("model-builderInner-Background");
41:
42: layout.setWidget(0, 0, new Lbl(HumanReadable
43: .getActionDisplayName("retract"),
44: "modeller-action-Label"));
45: layout.setWidget(0, 1, new Lbl("[" + model.variableName + "]",
46: "modeller-action-Label"));
47:
48: initWidget(layout);
49: }
50:
51: }
|