/** * Default constructor. * * @param main reference to the main window */ public DialogNew(final GUI main) { super(main, CREATE_DATABASE); // define buttons first to assign simplest mnemonics buttons = okCancel(); db = List.list(main.context.soptions); final MainOptions opts = gui.context.options; final GUIOptions gopts = main.gopts; dbname = new BaseXTextField(gopts.get(GUIOptions.DBNAME), this); final BaseXBack pnl = new BaseXBack(new TableLayout(2, 1)); pnl.add(new BaseXLabel(NAME_OF_DB + COLS, false, true).border(8, 0, 6, 0)); pnl.add(dbname); // option panels final BaseXTabs tabs = new BaseXTabs(this); final DialogParsing parsing = new DialogParsing(this, tabs); general = new DialogImport(this, pnl, parsing); // index panel final BaseXBack indexes = new BaseXBack(new TableLayout(6, 1, 0, 0)).border(8); txtindex = new BaseXCheckBox(TEXT_INDEX, MainOptions.TEXTINDEX, opts, this).bold().large(); indexes.add(txtindex); indexes.add(new BaseXLabel(H_TEXT_INDEX, true, false)); atvindex = new BaseXCheckBox(ATTRIBUTE_INDEX, MainOptions.ATTRINDEX, opts, this).bold().large(); indexes.add(atvindex); indexes.add(new BaseXLabel(H_ATTR_INDEX, true, false)); // full-text panel ftxindex = new BaseXCheckBox(FULLTEXT_INDEX, MainOptions.FTINDEX, opts, this).bold().large(); indexes.add(ftxindex); ft = new DialogFT(this, true); indexes.add(ft); tabs.addTab(GENERAL, general); tabs.addTab(PARSING, parsing); tabs.addTab(INDEXES, indexes); set(tabs, BorderLayout.CENTER); set(buttons, BorderLayout.SOUTH); general.setType(general.input()); action(general.parsers); setResizable(true); finish(null); }