/**
*#########################################################################
*
* A component of the Gatherer application, part of the Greenstone digital
* library suite from the New Zealand Digital Library Project at the
* University of Waikato, New Zealand.
*
* Copyright (C) 1999 New Zealand Digital Library Project
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*########################################################################
*/
package org.greenstone.gatherer.cdm;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.undo.*;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.ws.Dispatch;
import org.fife.ui.rsyntaxtextarea.*;
import org.greenstone.gatherer.Configuration;
import org.greenstone.gatherer.DebugStream;
import org.greenstone.gatherer.Dictionary;
import org.greenstone.gatherer.Gatherer;
import org.greenstone.gatherer.gui.DesignPaneHeader;
import org.greenstone.gatherer.gui.GLIButton;
import org.greenstone.gatherer.gui.FormatPane;
import org.greenstone.gatherer.metadata.MetadataElement;
import org.greenstone.gatherer.metadata.MetadataSetManager;
import org.greenstone.gatherer.util.StaticStrings;
import org.greenstone.gatherer.util.Utility;
import org.greenstone.gatherer.util.XMLTools;
import org.w3c.dom.*;
import org.xml.sax.InputSource;
import java.awt.FontMetrics;
import java.awt.Graphics;
import java.awt.Insets;
import java.awt.Rectangle;
import java.io.ByteArrayInputStream;
/**
* This class maintains a list of format statements, and allows the addition and
* removal of these statements. This is the greenstone 3 equivalent class of
* FormatManager.java which is used by greenstone 2
*/
public class Format4gs3Manager implements SharedByTwoFormatManager
{
// The default global format
static final private String GLOBAL_FORMAT;
static
{
// @formatter:off
String GLOBAL_FORMAT_TEMP = "" +
"" +
"" +
"" +
"" +
"" +
"" +
"Untitled" +
"" +
"";
GLOBAL_FORMAT = GLOBAL_FORMAT_TEMP;
// @formatter:on
}
static final private String GLOBAL = "global";
//The default search format
static final private String SEARCH_FORMAT;
static
{
// @formatter:off
String SEARCH_FORMAT_TEMP = "" +
"" +
"