home *** CD-ROM | disk | FTP | other *** search
/ S283 Planetary Science &… the Search for Life CD 3 / 0_CD-ROM.iso / install / jre1_3 / lib / rt.jar / javax / swing / JInternalFrame.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  14.2 KB  |  780 lines

  1. package javax.swing;
  2.  
  3. import java.awt.AWTEvent;
  4. import java.awt.ActiveEvent;
  5. import java.awt.BorderLayout;
  6. import java.awt.Component;
  7. import java.awt.Container;
  8. import java.awt.EventQueue;
  9. import java.awt.Graphics;
  10. import java.awt.LayoutManager;
  11. import java.awt.MenuComponent;
  12. import java.awt.Rectangle;
  13. import java.beans.PropertyVetoException;
  14. import java.io.IOException;
  15. import java.io.ObjectOutputStream;
  16. import java.util.EventObject;
  17. import javax.accessibility.Accessible;
  18. import javax.accessibility.AccessibleContext;
  19. import javax.swing.event.InternalFrameEvent;
  20. import javax.swing.event.InternalFrameListener;
  21. import javax.swing.plaf.InternalFrameUI;
  22.  
  23. public class JInternalFrame extends JComponent implements Accessible, WindowConstants, RootPaneContainer {
  24.    private static final String uiClassID = "InternalFrameUI";
  25.    protected JRootPane rootPane;
  26.    protected boolean rootPaneCheckingEnabled;
  27.    protected boolean closable;
  28.    protected boolean isClosed;
  29.    protected boolean maximizable;
  30.    protected boolean isMaximum;
  31.    protected boolean iconable;
  32.    protected boolean isIcon;
  33.    protected boolean resizable;
  34.    protected boolean isSelected;
  35.    protected Icon frameIcon;
  36.    protected String title;
  37.    protected JDesktopIcon desktopIcon;
  38.    private boolean opened;
  39.    private Rectangle normalBounds;
  40.    private int defaultCloseOperation;
  41.    private Component lastFocusOwner;
  42.    public static final String CONTENT_PANE_PROPERTY = "contentPane";
  43.    public static final String MENU_BAR_PROPERTY = "menuBar";
  44.    public static final String TITLE_PROPERTY = "title";
  45.    public static final String LAYERED_PANE_PROPERTY = "layeredPane";
  46.    public static final String ROOT_PANE_PROPERTY = "rootPane";
  47.    public static final String GLASS_PANE_PROPERTY = "glassPane";
  48.    public static final String FRAME_ICON_PROPERTY = "frameIcon";
  49.    public static final String IS_SELECTED_PROPERTY = "selected";
  50.    public static final String IS_CLOSED_PROPERTY = "closed";
  51.    public static final String IS_MAXIMUM_PROPERTY = "maximum";
  52.    public static final String IS_ICON_PROPERTY = "icon";
  53.    boolean isDragging;
  54.    boolean danger;
  55.    // $FF: synthetic field
  56.    static Class class$javax$swing$event$InternalFrameListener;
  57.  
  58.    public JInternalFrame() {
  59.       this("", false, false, false, false);
  60.    }
  61.  
  62.    public JInternalFrame(String var1) {
  63.       this(var1, false, false, false, false);
  64.    }
  65.  
  66.    public JInternalFrame(String var1, boolean var2) {
  67.       this(var1, var2, false, false, false);
  68.    }
  69.  
  70.    public JInternalFrame(String var1, boolean var2, boolean var3) {
  71.       this(var1, var2, var3, false, false);
  72.    }
  73.  
  74.    public JInternalFrame(String var1, boolean var2, boolean var3, boolean var4) {
  75.       this(var1, var2, var3, var4, false);
  76.    }
  77.  
  78.    public JInternalFrame(String var1, boolean var2, boolean var3, boolean var4, boolean var5) {
  79.       this.rootPaneCheckingEnabled = false;
  80.       this.normalBounds = null;
  81.       this.defaultCloseOperation = 2;
  82.       this.isDragging = false;
  83.       this.danger = false;
  84.       this.setRootPane(this.createRootPane());
  85.       this.setLayout(new BorderLayout());
  86.       this.title = var1;
  87.       this.resizable = var2;
  88.       this.closable = var3;
  89.       this.maximizable = var4;
  90.       this.isMaximum = false;
  91.       this.iconable = var5;
  92.       this.isIcon = false;
  93.       ((JComponent)this).setVisible(false);
  94.       this.setRootPaneCheckingEnabled(true);
  95.       this.desktopIcon = new JDesktopIcon(this);
  96.       this.updateUI();
  97.    }
  98.  
  99.    protected JRootPane createRootPane() {
  100.       return new JRootPane();
  101.    }
  102.  
  103.    public InternalFrameUI getUI() {
  104.       return (InternalFrameUI)super.ui;
  105.    }
  106.  
  107.    public void setUI(InternalFrameUI var1) {
  108.       boolean var2 = this.isRootPaneCheckingEnabled();
  109.  
  110.       try {
  111.          this.setRootPaneCheckingEnabled(false);
  112.          super.setUI(var1);
  113.       } finally {
  114.          this.setRootPaneCheckingEnabled(var2);
  115.       }
  116.  
  117.    }
  118.  
  119.    public void updateUI() {
  120.       this.setUI((InternalFrameUI)UIManager.getUI(this));
  121.       ((Container)this).invalidate();
  122.       if (this.desktopIcon != null) {
  123.          this.desktopIcon.updateUIWhenHidden();
  124.       }
  125.  
  126.    }
  127.  
  128.    void updateUIWhenHidden() {
  129.       this.setUI((InternalFrameUI)UIManager.getUI(this));
  130.       ((Container)this).invalidate();
  131.       Component[] var1 = ((Container)this).getComponents();
  132.       if (var1 != null) {
  133.          for(int var2 = 0; var2 < var1.length; ++var2) {
  134.             SwingUtilities.updateComponentTreeUI(var1[var2]);
  135.          }
  136.       }
  137.  
  138.    }
  139.  
  140.    public String getUIClassID() {
  141.       return "InternalFrameUI";
  142.    }
  143.  
  144.    protected boolean isRootPaneCheckingEnabled() {
  145.       return this.rootPaneCheckingEnabled;
  146.    }
  147.  
  148.    protected void setRootPaneCheckingEnabled(boolean var1) {
  149.       this.rootPaneCheckingEnabled = var1;
  150.    }
  151.  
  152.    private Error createRootPaneException(String var1) {
  153.       String var2 = this.getClass().getName();
  154.       return new Error("Do not use " + var2 + "." + var1 + "() use " + var2 + ".getContentPane()." + var1 + "() instead");
  155.    }
  156.  
  157.    protected void addImpl(Component var1, Object var2, int var3) {
  158.       if (this.isRootPaneCheckingEnabled()) {
  159.          throw this.createRootPaneException("add");
  160.       } else {
  161.          super.addImpl(var1, var2, var3);
  162.       }
  163.    }
  164.  
  165.    public void remove(Component var1) {
  166.       int var2 = ((Container)this).getComponentCount();
  167.       super.remove(var1);
  168.       if (var2 == ((Container)this).getComponentCount()) {
  169.          this.getContentPane().remove(var1);
  170.       }
  171.  
  172.    }
  173.  
  174.    public void setLayout(LayoutManager var1) {
  175.       if (this.isRootPaneCheckingEnabled()) {
  176.          throw this.createRootPaneException("setLayout");
  177.       } else {
  178.          super.setLayout(var1);
  179.       }
  180.    }
  181.  
  182.    public JMenuBar getMenuBar() {
  183.       return this.getRootPane().getMenuBar();
  184.    }
  185.  
  186.    public JMenuBar getJMenuBar() {
  187.       return this.getRootPane().getJMenuBar();
  188.    }
  189.  
  190.    public void setMenuBar(JMenuBar var1) {
  191.       JMenuBar var2 = this.getMenuBar();
  192.       this.getRootPane().setJMenuBar(var1);
  193.       ((JComponent)this).firePropertyChange("menuBar", var2, var1);
  194.    }
  195.  
  196.    public void setJMenuBar(JMenuBar var1) {
  197.       JMenuBar var2 = this.getMenuBar();
  198.       this.getRootPane().setJMenuBar(var1);
  199.       ((JComponent)this).firePropertyChange("menuBar", var2, var1);
  200.    }
  201.  
  202.    public Container getContentPane() {
  203.       return this.getRootPane().getContentPane();
  204.    }
  205.  
  206.    public void setContentPane(Container var1) {
  207.       Container var2 = this.getContentPane();
  208.       this.getRootPane().setContentPane(var1);
  209.       ((JComponent)this).firePropertyChange("contentPane", var2, var1);
  210.    }
  211.  
  212.    public JLayeredPane getLayeredPane() {
  213.       return this.getRootPane().getLayeredPane();
  214.    }
  215.  
  216.    public void setLayeredPane(JLayeredPane var1) {
  217.       JLayeredPane var2 = this.getLayeredPane();
  218.       this.getRootPane().setLayeredPane(var1);
  219.       ((JComponent)this).firePropertyChange("layeredPane", var2, var1);
  220.    }
  221.  
  222.    public Component getGlassPane() {
  223.       return this.getRootPane().getGlassPane();
  224.    }
  225.  
  226.    public void setGlassPane(Component var1) {
  227.       Component var2 = this.getGlassPane();
  228.       this.getRootPane().setGlassPane(var1);
  229.       ((JComponent)this).firePropertyChange("glassPane", var2, var1);
  230.    }
  231.  
  232.    public JRootPane getRootPane() {
  233.       return this.rootPane;
  234.    }
  235.  
  236.    protected void setRootPane(JRootPane var1) {
  237.       if (this.rootPane != null) {
  238.          this.remove(this.rootPane);
  239.       }
  240.  
  241.       JRootPane var2 = this.getRootPane();
  242.       this.rootPane = var1;
  243.       if (this.rootPane != null) {
  244.          boolean var3 = this.isRootPaneCheckingEnabled();
  245.  
  246.          try {
  247.             this.setRootPaneCheckingEnabled(false);
  248.             ((Container)this).add(this.rootPane, "Center");
  249.          } finally {
  250.             this.setRootPaneCheckingEnabled(var3);
  251.          }
  252.       }
  253.  
  254.       ((JComponent)this).firePropertyChange("rootPane", var2, var1);
  255.    }
  256.  
  257.    public void setClosable(boolean var1) {
  258.       Boolean var2 = this.closable ? Boolean.TRUE : Boolean.FALSE;
  259.       Boolean var3 = var1 ? Boolean.TRUE : Boolean.FALSE;
  260.       this.closable = var1;
  261.       ((JComponent)this).firePropertyChange("closable", var2, var3);
  262.    }
  263.  
  264.    public boolean isClosable() {
  265.       return this.closable;
  266.    }
  267.  
  268.    public boolean isClosed() {
  269.       return this.isClosed;
  270.    }
  271.  
  272.    public void setClosed(boolean var1) throws PropertyVetoException {
  273.       if (this.isClosed != var1) {
  274.          Boolean var2 = this.isClosed ? Boolean.TRUE : Boolean.FALSE;
  275.          Boolean var3 = var1 ? Boolean.TRUE : Boolean.FALSE;
  276.          if (var1) {
  277.             this.fireInternalFrameEvent(25550);
  278.          }
  279.  
  280.          ((JComponent)this).fireVetoableChange("closed", var2, var3);
  281.          this.isClosed = var1;
  282.          ((JComponent)this).firePropertyChange("closed", var2, var3);
  283.          if (this.isClosed) {
  284.             this.dispose();
  285.          } else if (!this.opened) {
  286.          }
  287.  
  288.       }
  289.    }
  290.  
  291.    public void setResizable(boolean var1) {
  292.       Boolean var2 = this.resizable ? Boolean.TRUE : Boolean.FALSE;
  293.       Boolean var3 = var1 ? Boolean.TRUE : Boolean.FALSE;
  294.       this.resizable = var1;
  295.       ((JComponent)this).firePropertyChange("resizable", var2, var3);
  296.    }
  297.  
  298.    public boolean isResizable() {
  299.       return this.isMaximum ? false : this.resizable;
  300.    }
  301.  
  302.    public void setIconifiable(boolean var1) {
  303.       this.iconable = var1;
  304.    }
  305.  
  306.    public boolean isIconifiable() {
  307.       return this.iconable;
  308.    }
  309.  
  310.    public boolean isIcon() {
  311.       return this.isIcon;
  312.    }
  313.  
  314.    public void setIcon(boolean var1) throws PropertyVetoException {
  315.       if (this.isIcon != var1) {
  316.          Container var2 = ((Component)this).getParent();
  317.          if (var2 != null && ((Component)var2).getPeer() == null) {
  318.             var2.addNotify();
  319.             ((JComponent)this).addNotify();
  320.          }
  321.  
  322.          ((Container)this).validate();
  323.          Boolean var3 = this.isIcon ? Boolean.TRUE : Boolean.FALSE;
  324.          Boolean var4 = var1 ? Boolean.TRUE : Boolean.FALSE;
  325.          ((JComponent)this).fireVetoableChange("icon", var3, var4);
  326.          this.isIcon = var1;
  327.          ((JComponent)this).firePropertyChange("icon", var3, var4);
  328.          if (var1) {
  329.             this.fireInternalFrameEvent(25552);
  330.          } else {
  331.             this.fireInternalFrameEvent(25553);
  332.          }
  333.  
  334.       }
  335.    }
  336.  
  337.    public void setMaximizable(boolean var1) {
  338.       Boolean var2 = this.maximizable ? Boolean.TRUE : Boolean.FALSE;
  339.       Boolean var3 = var1 ? Boolean.TRUE : Boolean.FALSE;
  340.       this.maximizable = var1;
  341.       ((JComponent)this).firePropertyChange("maximizable", var2, var3);
  342.    }
  343.  
  344.    public boolean isMaximizable() {
  345.       return this.maximizable;
  346.    }
  347.  
  348.    public boolean isMaximum() {
  349.       return this.isMaximum;
  350.    }
  351.  
  352.    public void setMaximum(boolean var1) throws PropertyVetoException {
  353.       if (this.isMaximum != var1) {
  354.          Boolean var2 = this.isMaximum ? Boolean.TRUE : Boolean.FALSE;
  355.          Boolean var3 = var1 ? Boolean.TRUE : Boolean.FALSE;
  356.          ((JComponent)this).fireVetoableChange("maximum", var2, var3);
  357.          this.isMaximum = var1;
  358.          ((JComponent)this).firePropertyChange("maximum", var2, var3);
  359.       }
  360.    }
  361.  
  362.    public String getTitle() {
  363.       return this.title;
  364.    }
  365.  
  366.    public void setTitle(String var1) {
  367.       String var2 = this.title;
  368.       this.title = var1;
  369.       ((JComponent)this).firePropertyChange("title", var2, var1);
  370.    }
  371.  
  372.    public void setSelected(boolean var1) throws PropertyVetoException {
  373.       if (this.isSelected != var1 && (!var1 || ((Component)this).isShowing())) {
  374.          Boolean var2 = this.isSelected ? Boolean.TRUE : Boolean.FALSE;
  375.          Boolean var3 = var1 ? Boolean.TRUE : Boolean.FALSE;
  376.          ((JComponent)this).fireVetoableChange("selected", var2, var3);
  377.          if (var1) {
  378.             JRootPane var4 = this.getRootPane();
  379.             if (var4.getCurrentFocusOwner() == null) {
  380.                if (var4.getPreviousFocusOwner() != null) {
  381.                   var4.getPreviousFocusOwner().requestFocus();
  382.                } else {
  383.                   this.getContentPane().requestFocus();
  384.                }
  385.             }
  386.          }
  387.  
  388.          this.isSelected = var1;
  389.          ((JComponent)this).firePropertyChange("selected", var2, var3);
  390.          if (this.isSelected) {
  391.             this.fireInternalFrameEvent(25554);
  392.          } else {
  393.             this.fireInternalFrameEvent(25555);
  394.          }
  395.  
  396.          ((Component)this).repaint();
  397.       }
  398.    }
  399.  
  400.    public boolean isSelected() {
  401.       return this.isSelected;
  402.    }
  403.  
  404.    public void setFrameIcon(Icon var1) {
  405.       Icon var2 = this.frameIcon;
  406.       this.frameIcon = var1;
  407.       ((JComponent)this).firePropertyChange("frameIcon", var2, var1);
  408.    }
  409.  
  410.    public Icon getFrameIcon() {
  411.       return this.frameIcon;
  412.    }
  413.  
  414.    public void moveToFront() {
  415.       if (((Component)this).getParent() != null && ((Component)this).getParent() instanceof JLayeredPane) {
  416.          JLayeredPane var1 = (JLayeredPane)((Component)this).getParent();
  417.          var1.moveToFront(this);
  418.       }
  419.  
  420.    }
  421.  
  422.    public void moveToBack() {
  423.       if (((Component)this).getParent() != null && ((Component)this).getParent() instanceof JLayeredPane) {
  424.          JLayeredPane var1 = (JLayeredPane)((Component)this).getParent();
  425.          var1.moveToBack(this);
  426.       }
  427.  
  428.    }
  429.  
  430.    public void setLayer(Integer var1) {
  431.       if (((Component)this).getParent() != null && ((Component)this).getParent() instanceof JLayeredPane) {
  432.          JLayeredPane var2 = (JLayeredPane)((Component)this).getParent();
  433.          var2.setLayer(this, var1, var2.getPosition(this));
  434.       } else {
  435.          JLayeredPane.putLayer(this, var1);
  436.          if (((Component)this).getParent() != null) {
  437.             ((Component)this).getParent().repaint(super._bounds.x, super._bounds.y, super._bounds.width, super._bounds.height);
  438.          }
  439.       }
  440.  
  441.    }
  442.  
  443.    public void setLayer(int var1) {
  444.       this.setLayer(new Integer(var1));
  445.    }
  446.  
  447.    public int getLayer() {
  448.       return JLayeredPane.getLayer(this);
  449.    }
  450.  
  451.    public JDesktopPane getDesktopPane() {
  452.       Container var1;
  453.       for(var1 = ((Component)this).getParent(); var1 != null && !(var1 instanceof JDesktopPane); var1 = ((Component)var1).getParent()) {
  454.       }
  455.  
  456.       if (var1 == null) {
  457.          for(var1 = this.getDesktopIcon().getParent(); var1 != null && !(var1 instanceof JDesktopPane); var1 = ((Component)var1).getParent()) {
  458.          }
  459.       }
  460.  
  461.       return (JDesktopPane)var1;
  462.    }
  463.  
  464.    public void setDesktopIcon(JDesktopIcon var1) {
  465.       JDesktopIcon var2 = this.getDesktopIcon();
  466.       this.desktopIcon = var1;
  467.       ((JComponent)this).firePropertyChange("desktopIcon", var2, var1);
  468.    }
  469.  
  470.    public JDesktopIcon getDesktopIcon() {
  471.       return this.desktopIcon;
  472.    }
  473.  
  474.    public Rectangle getNormalBounds() {
  475.       return this.normalBounds != null ? this.normalBounds : ((Component)this).getBounds();
  476.    }
  477.  
  478.    public void setNormalBounds(Rectangle var1) {
  479.       this.normalBounds = var1;
  480.    }
  481.  
  482.    public Component getFocusOwner() {
  483.       JRootPane var1 = this.getRootPane();
  484.       return var1 != null ? var1.getCurrentFocusOwner() : null;
  485.    }
  486.  
  487.    public void restoreSubcomponentFocus() {
  488.       if (this.getRootPane() != null && this.getRootPane().getPreviousFocusOwner() != null) {
  489.          this.getRootPane().getPreviousFocusOwner().requestFocus();
  490.       } else {
  491.          this.getContentPane().requestFocus();
  492.       }
  493.  
  494.    }
  495.  
  496.    synchronized void startModal() {
  497.       if (((Component)this).isVisible() && !((Component)this).isShowing()) {
  498.          for(Container var1 = ((Component)this).getParent(); var1 != null; var1 = ((Component)var1).getParent()) {
  499.             if (!((Component)var1).isVisible()) {
  500.                ((Component)var1).setVisible(true);
  501.             }
  502.          }
  503.       }
  504.  
  505.       try {
  506.          if (SwingUtilities.isEventDispatchThread()) {
  507.             EventQueue var5 = ((Component)this).getToolkit().getSystemEventQueue();
  508.  
  509.             while(((Component)this).isVisible()) {
  510.                AWTEvent var2 = var5.getNextEvent();
  511.                Object var3 = ((EventObject)var2).getSource();
  512.                if (var2 instanceof ActiveEvent) {
  513.                   ((ActiveEvent)var2).dispatch();
  514.                } else if (var3 instanceof Component) {
  515.                   ((Component)var3).dispatchEvent(var2);
  516.                } else if (var3 instanceof MenuComponent) {
  517.                   ((MenuComponent)var3).dispatchEvent(var2);
  518.                } else {
  519.                   System.err.println("unable to dispatch event: " + var2);
  520.                }
  521.             }
  522.          } else {
  523.             while(((Component)this).isVisible()) {
  524.                this.wait();
  525.             }
  526.          }
  527.       } catch (InterruptedException var4) {
  528.       }
  529.  
  530.    }
  531.  
  532.    synchronized void stopModal() {
  533.       this.notifyAll();
  534.    }
  535.  
  536.    public void reshape(int var1, int var2, int var3, int var4) {
  537.       super.reshape(var1, var2, var3, var4);
  538.       ((Container)this).validate();
  539.       ((Component)this).repaint();
  540.    }
  541.  
  542.    public void addInternalFrameListener(InternalFrameListener var1) {
  543.       super.listenerList.add(class$javax$swing$event$InternalFrameListener == null ? (class$javax$swing$event$InternalFrameListener = class$("javax.swing.event.InternalFrameListener")) : class$javax$swing$event$InternalFrameListener, var1);
  544.       ((Component)this).enableEvents(0L);
  545.    }
  546.  
  547.    public void removeInternalFrameListener(InternalFrameListener var1) {
  548.       super.listenerList.remove(class$javax$swing$event$InternalFrameListener == null ? (class$javax$swing$event$InternalFrameListener = class$("javax.swing.event.InternalFrameListener")) : class$javax$swing$event$InternalFrameListener, var1);
  549.    }
  550.  
  551.    protected void fireInternalFrameEvent(int var1) {
  552.       Object[] var2 = super.listenerList.getListenerList();
  553.       InternalFrameEvent var3 = null;
  554.  
  555.       for(int var4 = var2.length - 2; var4 >= 0; var4 -= 2) {
  556.          if (var2[var4] == (class$javax$swing$event$InternalFrameListener == null ? (class$javax$swing$event$InternalFrameListener = class$("javax.swing.event.InternalFrameListener")) : class$javax$swing$event$InternalFrameListener)) {
  557.             if (var3 == null) {
  558.                var3 = new InternalFrameEvent(this, var1);
  559.             }
  560.  
  561.             switch (((AWTEvent)var3).getID()) {
  562.                case 25549:
  563.                   ((InternalFrameListener)var2[var4 + 1]).internalFrameOpened(var3);
  564.                   break;
  565.                case 25550:
  566.                   ((InternalFrameListener)var2[var4 + 1]).internalFrameClosing(var3);
  567.                   break;
  568.                case 25551:
  569.                   ((InternalFrameListener)var2[var4 + 1]).internalFrameClosed(var3);
  570.                   break;
  571.                case 25552:
  572.                   ((InternalFrameListener)var2[var4 + 1]).internalFrameIconified(var3);
  573.                   break;
  574.                case 25553:
  575.                   ((InternalFrameListener)var2[var4 + 1]).internalFrameDeiconified(var3);
  576.                   break;
  577.                case 25554:
  578.                   ((InternalFrameListener)var2[var4 + 1]).internalFrameActivated(var3);
  579.                   break;
  580.                case 25555:
  581.                   ((InternalFrameListener)var2[var4 + 1]).internalFrameDeactivated(var3);
  582.             }
  583.          }
  584.       }
  585.  
  586.    }
  587.  
  588.    public void doDefaultCloseAction() {
  589.       this.fireInternalFrameEvent(25550);
  590.       switch (this.defaultCloseOperation) {
  591.          case 0:
  592.          default:
  593.             break;
  594.          case 1:
  595.             ((JComponent)this).setVisible(false);
  596.             if (this.isSelected()) {
  597.                try {
  598.                   this.setSelected(false);
  599.                } catch (PropertyVetoException var3) {
  600.                }
  601.             }
  602.             break;
  603.          case 2:
  604.             try {
  605.                ((JComponent)this).fireVetoableChange("closed", Boolean.FALSE, Boolean.TRUE);
  606.                this.isClosed = true;
  607.                ((JComponent)this).firePropertyChange("closed", Boolean.FALSE, Boolean.TRUE);
  608.                this.dispose();
  609.             } catch (PropertyVetoException var2) {
  610.             }
  611.       }
  612.  
  613.    }
  614.  
  615.    public void setDefaultCloseOperation(int var1) {
  616.       this.defaultCloseOperation = var1;
  617.    }
  618.  
  619.    public int getDefaultCloseOperation() {
  620.       return this.defaultCloseOperation;
  621.    }
  622.  
  623.    public void pack() {
  624.       Container var1 = ((Component)this).getParent();
  625.       if (var1 != null && ((Component)var1).getPeer() == null) {
  626.          var1.addNotify();
  627.          ((JComponent)this).addNotify();
  628.       }
  629.  
  630.       ((Component)this).setSize(((JComponent)this).getPreferredSize());
  631.       ((Container)this).validate();
  632.    }
  633.  
  634.    public void show() {
  635.       Container var1 = ((Component)this).getParent();
  636.       if (var1 != null && ((Component)var1).getPeer() == null) {
  637.          var1.addNotify();
  638.          ((JComponent)this).addNotify();
  639.       }
  640.  
  641.       ((Container)this).validate();
  642.       if (!this.opened) {
  643.          this.fireInternalFrameEvent(25549);
  644.          this.opened = true;
  645.       }
  646.  
  647.       this.getDesktopIcon().setVisible(true);
  648.       this.toFront();
  649.       if (!((Component)this).isVisible()) {
  650.          super.show();
  651.       }
  652.  
  653.       if (!this.isIcon) {
  654.          if (!this.isSelected()) {
  655.             try {
  656.                this.setSelected(true);
  657.             } catch (PropertyVetoException var3) {
  658.             }
  659.          }
  660.  
  661.       }
  662.    }
  663.  
  664.    public void dispose() {
  665.       if (((Component)this).isVisible()) {
  666.          ((JComponent)this).setVisible(false);
  667.       }
  668.  
  669.       if (this.isSelected()) {
  670.          try {
  671.             this.setSelected(false);
  672.          } catch (PropertyVetoException var2) {
  673.          }
  674.       }
  675.  
  676.       if (!this.isClosed) {
  677.          ((JComponent)this).firePropertyChange("closed", Boolean.FALSE, Boolean.TRUE);
  678.          this.isClosed = true;
  679.       }
  680.  
  681.       this.fireInternalFrameEvent(25551);
  682.    }
  683.  
  684.    public void toFront() {
  685.       this.moveToFront();
  686.    }
  687.  
  688.    public void toBack() {
  689.       this.moveToBack();
  690.    }
  691.  
  692.    public final String getWarningString() {
  693.       return null;
  694.    }
  695.  
  696.    private void writeObject(ObjectOutputStream var1) throws IOException {
  697.       var1.defaultWriteObject();
  698.       if (super.ui != null && this.getUIClassID().equals("InternalFrameUI")) {
  699.          boolean var2 = this.isRootPaneCheckingEnabled();
  700.  
  701.          try {
  702.             this.setRootPaneCheckingEnabled(false);
  703.             super.ui.installUI(this);
  704.          } finally {
  705.             this.setRootPaneCheckingEnabled(var2);
  706.          }
  707.       }
  708.  
  709.    }
  710.  
  711.    void compWriteObjectNotify() {
  712.       if (super.ui != null) {
  713.          boolean var1 = this.isRootPaneCheckingEnabled();
  714.  
  715.          try {
  716.             this.setRootPaneCheckingEnabled(false);
  717.             super.ui.uninstallUI(this);
  718.          } finally {
  719.             this.setRootPaneCheckingEnabled(var1);
  720.          }
  721.       }
  722.  
  723.       super.compWriteObjectNotify();
  724.    }
  725.  
  726.    protected String paramString() {
  727.       String var1 = this.rootPane != null ? this.rootPane.toString() : "";
  728.       String var2 = this.rootPaneCheckingEnabled ? "true" : "false";
  729.       String var3 = this.closable ? "true" : "false";
  730.       String var4 = this.isClosed ? "true" : "false";
  731.       String var5 = this.maximizable ? "true" : "false";
  732.       String var6 = this.isMaximum ? "true" : "false";
  733.       String var7 = this.iconable ? "true" : "false";
  734.       String var8 = this.isIcon ? "true" : "false";
  735.       String var9 = this.resizable ? "true" : "false";
  736.       String var10 = this.isSelected ? "true" : "false";
  737.       String var11 = this.frameIcon != null ? this.frameIcon.toString() : "";
  738.       String var12 = this.title != null ? this.title : "";
  739.       String var13 = this.desktopIcon != null ? this.desktopIcon.toString() : "";
  740.       String var14 = this.opened ? "true" : "false";
  741.       String var15;
  742.       if (this.defaultCloseOperation == 1) {
  743.          var15 = "HIDE_ON_CLOSE";
  744.       } else if (this.defaultCloseOperation == 2) {
  745.          var15 = "DISPOSE_ON_CLOSE";
  746.       } else if (this.defaultCloseOperation == 0) {
  747.          var15 = "DO_NOTHING_ON_CLOSE";
  748.       } else {
  749.          var15 = "";
  750.       }
  751.  
  752.       return super.paramString() + ",closable=" + var3 + ",defaultCloseOperation=" + var15 + ",desktopIcon=" + var13 + ",frameIcon=" + var11 + ",iconable=" + var7 + ",isClosed=" + var4 + ",isIcon=" + var8 + ",isMaximum=" + var6 + ",isSelected=" + var10 + ",maximizable=" + var5 + ",opened=" + var14 + ",resizable=" + var9 + ",rootPane=" + var1 + ",rootPaneCheckingEnabled=" + var2 + ",title=" + var12;
  753.    }
  754.  
  755.    protected void paintComponent(Graphics var1) {
  756.       if (this.isDragging) {
  757.          this.danger = true;
  758.       }
  759.  
  760.       super.paintComponent(var1);
  761.    }
  762.  
  763.    public AccessibleContext getAccessibleContext() {
  764.       if (super.accessibleContext == null) {
  765.          super.accessibleContext = new AccessibleJInternalFrame(this);
  766.       }
  767.  
  768.       return super.accessibleContext;
  769.    }
  770.  
  771.    // $FF: synthetic method
  772.    static Class class$(String var0) {
  773.       try {
  774.          return Class.forName(var0);
  775.       } catch (ClassNotFoundException var2) {
  776.          throw new NoClassDefFoundError(((Throwable)var2).getMessage());
  777.       }
  778.    }
  779. }
  780.