/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package DrawTop;


import javax.swing.*;
import javax.swing.border.Border.*;
import menu.*;
import shape.*;
import util.*;
import shapeUtil.*;

public class ObjectTable {
    public static boolean formalVersion=true;
    public static boolean videoCapture=true;
    protected static DrawMain main=null;
    protected static JTabbedPane tabbedPane=null;
    protected static JPanel glassPane=null;
    protected static DrawPanel drawPanel=null;
    protected static ListenerPanel listenerPanel=null;
    protected static GuidancePanel guidancePanel=null;
    protected static StatusPanel statusPanel=null;
    protected static JScrollPane scrollPane=null;
    protected static JViewport viewport=null;
    public static PageManager pageManager=null;
    protected static ContainerManager containerManager=null;
    protected static ExecCommand execCommand=null;
    protected static ExecPopupMenu execPopupMenu=null;
    protected static SelectionLS selectionLS=null;
    protected static MousePositionLS mousePositionLS=null;
    protected static CreateAuxShape createAuxShape=null;
    protected static MoveResizeShapeLS moveResizeShapeLS=null;
    protected static ConnectionLS ConnectionLS=null;
    protected static MenuUtil menuUtil=null;
    public static UndoDrawManager undoDrawManager=null;
    protected static FileIo fileIo=null;
    protected static DrawFileIo drawFileIo=null;
    protected static SysErrOutput sysErrOutput=null;
    protected static Edit edit=null;
    protected static ViewUtil viewUtil=null;
    protected static ComponentLibDialog componentLibDialog=null;
    protected static ButtonOfFontMenu buttonOfFontMenu=null;
    protected static CustomColorChooserDialog customColorChooserDialog=null;
    protected static TempShapeManager tempShapeManager=null;
    protected static BlinkingShape blinkingShape=null;
    
    public static DrawMain getDrawMain(){
        if(main==null) System.out.println("* ObjectTable DrawMain=null");
        return main;
    }

    public static JTabbedPane getTabbedPane(String from){
        if(tabbedPane==null) System.out.println("* ObjectTable TabbedPane=null, called from="+from);
        return tabbedPane;
    }

    public static JPanel getGlassPane(String from){
        if(glassPane==null) System.out.println("* ObjectTable GlassPane=null, " +
                "called from="+from);
        return glassPane;
    }

    public static DrawPanel getDrawPanel(String from){
        if(listenerPanel==null) System.out.println("* ObjectTable ListenerPanel=null, " +
                "called from="+from);
        return drawPanel;
    }
    public static DrawPanel getDrawPanel(){
        if(listenerPanel==null) System.out.println("* ObjectTable ListenerPanel=null, ");
        return drawPanel;
    }
    
    public static ListenerPanel getListenerPanel(String from){
        if(listenerPanel==null) System.out.println("* ObjectTable ListenerPanel=null, " +
                "called from="+from);
        return listenerPanel;
    }
    public static ListenerPanel getListenerPanel(){
        if(listenerPanel==null) System.out.println("* ObjectTable ListenerPanel=null, ");
        return listenerPanel;
    }
    
    public static GuidancePanel getGuidancePanel(String from){
        if(guidancePanel==null) System.out.println("* ObjectTable GuidancePanell=null, " +
                "called from="+from);
        return guidancePanel;
    }

    public static StatusPanel getStatusPanel(){
        if(statusPanel==null) System.out.println("* ObjectTable statusPanel=null, " );
        return statusPanel;
    }
    
    public static JScrollPane getScrollPane(String from){
        if(scrollPane==null) System.out.println("* ObjectTable ScrollPane=null, " +
                "called from="+from);
        return scrollPane;
    }
    
    public static JScrollPane getScrollPane(){
        if(scrollPane==null) System.out.println("* ObjectTable ScrollPane=null, " );
        return scrollPane;
    }
    
    public static JViewport getViewport(String from){
        if(viewport==null) System.out.println("* ObjectTable ScrollPane=null, " +
                "called from="+from);
        return viewport;
    }

    public static PageManager getPageManager(String from){
        if(pageManager==null) System.out.println("* ObjectTable PageManager=null, " +
                "called from="+from);
        return pageManager;
    }
    public static PageManager getPageManager(){
        if(pageManager==null) System.out.println("* ObjectTable PageManager=null, ");
        return pageManager;
    }
    
    public static ContainerManager getContainerManager(String from){
        if(containerManager==null) System.out.println("* ObjectTable ContainerManager=null" +
                ", called from="+from);
        return containerManager;
    }
    public static ContainerManager getContainerManager(){
        if(containerManager==null) System.out.println("* ObjectTable ContainerManager=null");
        return containerManager;
    }
    
    public static ExecCommand getExecCommand(String from){
        if(execCommand==null) System.out.println("* ObjectTable ExecCommand=null" +
                ", called from="+from);
        return execCommand;
    }
    public static ExecCommand getExecCommand(){
        if(execCommand==null) System.out.println("* ObjectTable ExecCommand=null");
        return execCommand;
    }
    
    public static ExecPopupMenu getExecPopupMenu(String from){
        if(execPopupMenu==null) System.out.println("* ObjectTable ExecPopupMenu=null" +
                ", called from="+from);
        return execPopupMenu;
    }
    
    public static SelectionLS getSelectionLS(String from){
        if(selectionLS==null) System.out.println("* ObjectTable SelectionLS=null" +
                ", called from="+from);
        return selectionLS;
    }
    public static SelectionLS getSelectionLS(){
        if(selectionLS==null) System.out.println("* ObjectTable SelectionLS=null");
        return selectionLS;
    }
    
    public static MousePositionLS getMousePositionLS(String from){
        if(mousePositionLS==null) System.out.println("* ObjectTable MousePositionLS=null, " +
                "called from="+from);
        return mousePositionLS;
    }
    public static MousePositionLS getMousePositionLS(){
        if(mousePositionLS==null) System.out.println("* ObjectTable MousePositionLS=null, ");
        return mousePositionLS;
    }

    public static CreateAuxShape getCreateAuxShape() {
        return createAuxShape;
    }

    public static MoveResizeShapeLS getAutoAlignLS() {
        return moveResizeShapeLS;
    }
 
    public static ConnectionLS getConnectionLS(){
        if(ConnectionLS==null) System.out.println("* ObjectTable ConnectionLS=null, ");
        return ConnectionLS;
    }
    
    public static MenuUtil getMenuListener(){
        return menuUtil;
        
    }
    public static MenuUtil getMenuUtil(){
        if(menuUtil==null) System.out.println("* ObjectTable MenuUT=null");
        return menuUtil;
    }

    public static UndoDrawManager getUndoDrawManager(String from){
        if(undoDrawManager==null) System.out.println("* ObjectTable UndoDrawManager=null, " +
                "called from="+from);
        return undoDrawManager;
    }
    public static UndoDrawManager getUndoDrawManager(){
        if(undoDrawManager==null) System.out.println("* ObjectTable UndoDrawManager=null, " );
        return undoDrawManager;
    }
    
    public static FileIo getFileIo(String from){
        if(fileIo==null) System.out.println("* ObjectTable FileIo=null, called from="+from);
        return fileIo;
    }
    public static FileIo getFileIo(){
        if(fileIo==null) System.out.println("* ObjectTable FileIo=null");
        return fileIo;
    }
    public static DrawFileIo getDrawFileIo(){
        if(drawFileIo==null) System.out.println("* ObjectTable DrawFileIo=null");
        return drawFileIo;
    }
    public static SysErrOutput getSysErrOutput(){
        if(sysErrOutput==null) System.out.println("* ObjectTable sysErrFileOutput=null");
        return sysErrOutput;
    }
    public static Edit getEdit(String from){
        if(edit==null) System.out.println("* ObjectTable Edit=null, called from="+from);
        return edit;
    }
    public static Edit getEdit(){
        if(edit==null) System.out.println("* ObjectTable Edit=null");
        return edit;
    }
    
    public static ViewUtil getViewUtil(String from){
        if(viewUtil==null) System.out.println("* ObjectTable Utility=null, called from="+from);
        return viewUtil;
    }

    public static ComponentLibDialog getComponentLibDialog(){
        if(componentLibDialog==null) System.out.println("* ObjectTable ComponentLibDialog=null");
        return componentLibDialog;
    }

    public static ButtonOfFontMenu getButtonOfFontMenu(){
        if(buttonOfFontMenu==null) System.out.println("* ObjectTable ButtonOfFontMenu=null");
        return buttonOfFontMenu;
    }

    public static CustomColorChooserDialog getCustomColorChooserDialog(){
        if(customColorChooserDialog==null) System.out.println("* ObjectTable CustomColorChooserDialog=null");
        return customColorChooserDialog;
    }
    
    public static TempShapeManager getTempShapeManager(){
        if(tempShapeManager==null) System.out.println("* ObjectTable TempShapeManager=null");
        return tempShapeManager;
    }
    
    public static TempShapeManager getTempShapeManager(String from){
        if(tempShapeManager==null) System.out.println("* ObjectTable TempShapeManager=null"
                + ", called from="+from);
        return tempShapeManager;
    }
    
    public static BlinkingShape getBlinkingShape(){
        if(blinkingShape==null) System.out.println("* ObjectTable BlinkingShape=null");
        return blinkingShape;
    }
}
