home *** CD-ROM | disk | FTP | other *** search
- package com.extensibility.xa;
-
- import com.extensibility.app.UI;
- import com.extensibility.util.Debug;
- import com.extensibility.xml.BaseDeclaration;
- import com.extensibility.xml.DTDUtilities;
- import com.extensibility.xml.EntityDeclaration;
- import com.extensibility.xml.InternalPEDeclaration;
- import com.extensibility.xml.URI;
- import java.awt.Component;
- import java.awt.Point;
- import java.util.Enumeration;
- import javax.swing.JFrame;
- import javax.swing.JPanel;
- import javax.swing.text.JTextComponent;
-
- public class ConstraintsCellDialog extends CellDialog {
- static Point lastLoc = new Point(0, 0);
- // $FF: renamed from: oq com.extensibility.xa.OptionsQlicker
- OptionsQlicker field_0;
- JPanel btns;
- Enumeration reusables;
- Enumeration notations;
- BaseDeclaration owner;
-
- public ConstraintsCellDialog(JFrame var1, SchemaDoc var2, OptionsQlicker var3, BaseDeclaration var4, boolean var5, String var6) {
- super(var1, var2);
- boolean var7 = false;
- this.reusables = var2.getConstraintPENames();
- this.notations = new 1(var2, (ConstraintsCellDialog)null);
- this.field_0 = var3 != null ? var3 : new OptionsQlicker(((CellDialog)this).getSchemaDoc(), new OptionsQDataSource(((CellDialog)this).getSchemaDoc()));
- Object var8;
- if (var4 != null) {
- var7 = true;
- var8 = var4.getName();
- this.owner = var4;
- } else if (var5) {
- var8 = null;
- } else {
- var8 = var2.getConstraintPENames();
- }
-
- if (lastLoc.x == 0 && lastLoc.y == 0) {
- lastLoc.x = 100;
- lastLoc.y = 100;
- }
-
- ((Component)this).setLocation(lastLoc);
- ((CellDialog)this).prepare(UI.getString(var7 ? "dialog.constraints.cell.title" : "dialog.constraints.reusable.title"), UI.getString(var7 ? "dialog.constraints.cell.heading" : "dialog.constraints.reusable.heading"), var8);
- if (var4 != null) {
- this.setCellOwner(var4.getName(), var6);
- }
-
- }
-
- protected JPanel createButtonPanel() {
- return this.field_0.adoptBtnPanel();
- }
-
- protected JTextComponent createEditor() {
- return this.field_0;
- }
-
- public void dispose() {
- lastLoc = ((Component)this).getLocation();
- super.dispose();
- }
-
- protected Enumeration getList(int var1) {
- if (var1 == 0) {
- return this.notations;
- } else if (var1 == 1) {
- return this.reusables;
- } else {
- Debug.assert(false, "getlist > 1");
- return null;
- }
- }
-
- protected String getListTab(int var1) {
- if (var1 > 1) {
- return null;
- } else {
- String var2 = String.valueOf("dialog.constraints.tab").concat(String.valueOf(var1));
- return UI.getString(var2);
- }
- }
-
- protected void insertName(String var1) {
- this.field_0.insertName(var1);
- }
-
- protected void setCellOwner(String var1, String var2) {
- if (var2 == null) {
- String var3 = DTDUtilities.convertPEName(var1, false);
- InternalPEDeclaration var4 = (InternalPEDeclaration)super.doc.getNamedDeclaration(var3, Class.forName("com.extensibility.xml.InternalPEDeclaration"));
- URI var5 = ((BaseDeclaration)var4).getURI();
- ((CellDialog)this).setURI(var5.equals(((CellDialog)this).getSchemaDoc().getURI()) ? null : var5);
- ((CellDialog)this).setText(((EntityDeclaration)var4).getValue());
- } else {
- ((CellDialog)this).setText(var2);
- }
-
- super.setCellOwner(var1, var2);
- }
- }
-