home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / esc.jar / com / extensibility / xa / ElementTable$ElemModelCellDialog.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-06-30  |  2.9 KB  |  61 lines

  1. package com.extensibility.xa;
  2.  
  3. import com.extensibility.app.DialogFactory;
  4. import com.extensibility.xml.ElementDeclaration;
  5. import com.extensibility.xml.ParserException;
  6. import javax.swing.JFrame;
  7.  
  8. public class ElementTable$ElemModelCellDialog extends MetaModelCellDialog {
  9.    // $FF: synthetic field
  10.    final ElementTable this$0;
  11.    int row;
  12.    int column;
  13.  
  14.    public ElementTable$ElemModelCellDialog(ElementTable var1, JFrame var2, SchemaDoc var3, ContentModelQlicker var4, ElementDeclaration var5, String var6) {
  15.       super(var2, var3, var4, var5, false, var6);
  16.       this.this$0 = var1;
  17.    }
  18.  
  19.    void setTableInfo(int var1, int var2) {
  20.       this.row = var1;
  21.       this.column = var2;
  22.    }
  23.  
  24.    protected void doApply() {
  25.       try {
  26.          ((ModelCellDialog)this).getSchemaDoc().checkContentModel(super.owner.getName(), ((CellDialog)this).getText());
  27.          this.this$0.getModel().setValueAt(((CellDialog)this).getText(), this.row, this.column);
  28.          super.doApply();
  29.       } catch (ParserException var2) {
  30.          DialogFactory.showValidation(this, var2.getMessage(), false);
  31.       }
  32.  
  33.    }
  34.  
  35.    protected boolean doSave() {
  36.       try {
  37.          if (super.applied && super.canceled) {
  38.             ((MetaModelCellDialog)this).getElemDecl().setCPMetaProps(super.originalProps);
  39.          }
  40.  
  41.          ((ModelCellDialog)this).getSchemaDoc().touch(((MetaModelCellDialog)this).getElemDecl());
  42.          ((ModelCellDialog)this).getSchemaDoc().checkContentModel(super.owner.getName(), ((CellDialog)this).getText());
  43.          this.this$0.getModel().setValueAt(((CellDialog)this).getText(), this.row, this.column);
  44.          if (this.this$0.getCellEditor() instanceof ContentModelQlicker) {
  45.             ((ContentModelQlicker)this.this$0.getCellEditor()).setText(((CellDialog)this).getText());
  46.          }
  47.  
  48.          if (((ModelCellDialog)this).getSchemaDoc().getSchema().isSupported("GESTALT_OPEN_CONTENT") && super.owner != null) {
  49.             super.owner.getContentModel().setOpen(((CellDialog)this).getOpenModel());
  50.          }
  51.  
  52.          boolean var1 = true;
  53.          return var1;
  54.       } catch (ParserException var3) {
  55.          DialogFactory.showValidation(this, var3.getMessage(), false);
  56.          boolean var2 = false;
  57.          return var2;
  58.       }
  59.    }
  60. }
  61.