Weitere aktuelle Java-Titel finden Sie bei dpunkt.
 Inhaltsverzeichnis   Vorhergehendes Paket   Seite Zurück   Seite Vor   Nächstes Paket   Paketübersicht   Index

Klasse javax.swing.JInternalFrame1.2

java.lang.Object
   |
   +--java.awt.Component
         |
         +--java.awt.Container
               |
               +--javax.swing.JComponent
                     |
                     +--javax.swing.JInternalFrame

Deklaration

public class JInternalFrame
extends javax.swing.JComponent
implements javax.accessibility.Accessible, javax.swing.WindowConstants, javax.swing.RootPaneContainer

Beschreibung

Ein JInternalFrame ist eine Lightweight-Komponente, die ein Fenster in einem Multiple Document Interface (MDI) darstellt. Daher wird es typischerweise in einem JDesktopPane-Exemplar eingefügt. Komponenten des Fensters werden in das Content-Pane integriert (hier wird der Standard-Layoutmanager des JInternalFrame, das BorderLayout, benutzt):
 JComponent c = (JComponent) internalFrame.getContentPane();
 c.add(new JButton(), BorderLayout.NORTH);
 c.add(new JButton(), BorderLayout.CENTER);


 
Geschachtelte Klassen
protectedJInternalFrame.AccessibleJInternalFrame
public staticJInternalFrame.JDesktopIcon
 
Datenelemente
protected JRootPanerootPane
protected booleanrootPaneCheckingEnabled
protected booleanclosable
protected booleanisClosed
protected booleanmaximizable
protected booleanisMaximum
protected booleaniconable
protected booleanisIcon
protected booleanresizable
protected booleanisSelected
protected IconframeIcon
protected Stringtitle
protected JInternalFrame.JDesktopIcondesktopIcon
public final static StringCONTENT_PANE_PROPERTY
public final static StringMENU_BAR_PROPERTY
public final static StringTITLE_PROPERTY
public final static StringLAYERED_PANE_PROPERTY
public final static StringROOT_PANE_PROPERTY
public final static StringGLASS_PANE_PROPERTY
public final static StringFRAME_ICON_PROPERTY
public final static StringIS_SELECTED_PROPERTY
public final static StringIS_CLOSED_PROPERTY
public final static StringIS_MAXIMUM_PROPERTY
public final static StringIS_ICON_PROPERTY
 
Konstruktoren
publicJInternalFrame()
publicJInternalFrame(String title)
publicJInternalFrame(String title, boolean resizable)
publicJInternalFrame(String title, boolean resizable, boolean closable)
publicJInternalFrame(String title, boolean resizable, boolean closable, boolean maximizable)
publicJInternalFrame(String title, boolean resizable, boolean closable, boolean maximizable, boolean iconifiable)
 
Methoden
protected JRootPanecreateRootPane()
public InternalFrameUIgetUI()
public voidsetUI(InternalFrameUI ui)
public voidupdateUI()
public StringgetUIClassID()
protected booleanisRootPaneCheckingEnabled()
protected voidsetRootPaneCheckingEnabled(boolean enabled)
protected voidaddImpl(Component comp, Object constraints, int index)
public voidremove(Component comp)
public voidsetLayout(LayoutManager manager)
public JMenuBargetMenuBar()
      Verworfen in Version 1.4.
public JMenuBargetJMenuBar()
public voidsetMenuBar(JMenuBar m)
      Verworfen in Version 1.4.
public voidsetJMenuBar(JMenuBar m)
public ContainergetContentPane()
public voidsetContentPane(Container c)
public JLayeredPanegetLayeredPane()
public voidsetLayeredPane(JLayeredPane layered)
public ComponentgetGlassPane()
public voidsetGlassPane(Component glass)
public JRootPanegetRootPane()
protected voidsetRootPane(JRootPane root)
public voidsetClosable(boolean b)
public booleanisClosable()
public booleanisClosed()
public voidsetClosed(boolean b)
public voidsetResizable(boolean b)
public booleanisResizable()
public voidsetIconifiable(boolean b)
public booleanisIconifiable()
public booleanisIcon()
public voidsetIcon(boolean b)
public voidsetMaximizable(boolean b)
public booleanisMaximizable()
public booleanisMaximum()
public voidsetMaximum(boolean b)
public StringgetTitle()
public voidsetTitle(String title)
public voidsetSelected(boolean selected)
public booleanisSelected()
public voidsetFrameIcon(Icon icon)
public IcongetFrameIcon()
public voidmoveToFront()
public voidmoveToBack()
public voidsetLayer(Integer layer)
public voidsetLayer(int layer)     [1.3]
public intgetLayer()
public JDesktopPanegetDesktopPane()
public voidsetDesktopIcon(JInternalFrame.JDesktopIcon d)
public JInternalFrame.JDesktopIcongetDesktopIcon()
public RectanglegetNormalBounds()     [1.3]
public voidsetNormalBounds(Rectangle r)     [1.3]
public ComponentgetFocusOwner()     [1.3]
public ComponentgetMostRecentFocusOwner()     [1.4]
public voidrestoreSubcomponentFocus()     [1.3]
public voidreshape(int x, int y, int width, int height)
public voidaddInternalFrameListener(InternalFrameListener l)
public voidremoveInternalFrameListener(InternalFrameListener l)
public InternalFrameListener[]getInternalFrameListeners()     [1.4]
protected voidfireInternalFrameEvent(int id)
public voiddoDefaultCloseAction()     [1.3]
public voidsetDefaultCloseOperation(int operation)
public intgetDefaultCloseOperation()
public voidpack()
public voidshow()
public voiddispose()
public voidtoFront()
public voidtoBack()
public final voidsetFocusCycleRoot(boolean focusCycleRoot)     [1.4]
public final booleanisFocusCycleRoot()     [1.4]
public final ContainergetFocusCycleRootAncestor()     [1.4]
public final StringgetWarningString()
protected StringparamString()
protected voidpaintComponent(Graphics g)
public AccessibleContextgetAccessibleContext()


 

Datenelemente im Detail

protected JRootPane rootPane
Das JRootPane-Exemplar, welches die Content-Pane, Menüleiste und die Glass-Pane verwaltet.
protected boolean rootPaneCheckingEnabled
Wenn auf true gesetzt, wird eine Exception ausgelöst, wenn man versucht, Komponenten direkt zum Fenster hinzuzufügen, statt über das Content-Pane zu gehen.
protected boolean closable
Gibt an, ob das Fenster geschlossen werden kann.
protected boolean isClosed
Gibt an, ob das Fenster geschlossen ist.
protected boolean maximizable
Gibt an, ob das Fenster maximierbar ist.
protected boolean isMaximum
Gibt an, ob das Fenster maximiert ist.
protected boolean iconable
Gibt an, ob das Fenster ikonifizierbar ist.
protected boolean isIcon
Gibt an, ob das Fenster ikonifiziert ist.
protected boolean resizable
Gibt an, ob das Fenster in der Größe veränderbar ist.
protected boolean isSelected
Gibt an, ob das Fenster selektiert ist.
protected Icon frameIcon
Das Bild, das im Fenster links oben angezeigt wird.
protected String title
Der Titel des Fensters.
protected JInternalFrame.JDesktopIcon desktopIcon
Das Icon für den ikonifizierten Status.
public final static String CONTENT_PANE_PROPERTY
Die Konstante für den Content-Pane.
public final static String MENU_BAR_PROPERTY
Die Konstante für die Menüleiste.
public final static String TITLE_PROPERTY
Die Konstante für den Titel.
public final static String LAYERED_PANE_PROPERTY
Die Konstante für das LayeredPane.
public final static String ROOT_PANE_PROPERTY
Die Konstante für die JRootPane.
public final static String GLASS_PANE_PROPERTY
Die Konstante für das Glass-Pane.
public final static String FRAME_ICON_PROPERTY
Die Konstante für das Fenster-Icon.
public final static String IS_SELECTED_PROPERTY
Konstante für den Selektiert-Status.
public final static String IS_CLOSED_PROPERTY
Konstante für den Geschlossen-Status.
public final static String IS_MAXIMUM_PROPERTY
Konstante für den Maximiert-Status.
public final static String IS_ICON_PROPERTY
Konstante für den Ikonifiziert-Status.

 

Konstruktoren im Detail

public JInternalFrame()
Erstellt ein Fenster, das nicht in der Größe veränderbar ist, nicht geschlossen, maximiert oder ikonifiziert werden kann.
public JInternalFrame(String title)
Erstellt ein Fenster mit dem angegebenen Namen, das nicht in der Größe veränderbar ist, nicht geschlossen, maximiert oder ikonifiziert werden kann.
public JInternalFrame(String title, boolean resizable)
Erstellt ein Fenster mit dem angegebenen Namen, das nicht geschlossen, maximiert oder ikonifiziert werden kann.
public JInternalFrame(String title, boolean resizable, boolean closable)
Erstellt ein Fenster mit dem angegebenen Namen, das nicht maximiert oder ikonifiziert werden kann.
public JInternalFrame(String title, boolean resizable, boolean closable, boolean maximizable)
Erstellt ein Fenster mit dem angegebenen Namen, das nicht ikonifiziert werden kann.
public JInternalFrame(String title, boolean resizable, boolean closable, boolean maximizable, boolean iconifiable)
Erstellt ein Fenster mit dem angegebenen Namen.

 

Methoden im Detail

protected JRootPane createRootPane()
Wird vom Konstruktor aufgerufen, um eine neues JRootPane-Exemplar zu erzeugen.
public InternalFrameUI getUI()
Liefert das Look-and-Feel-Objekt, das diese Komponente zeichnet.
public void setUI(InternalFrameUI ui)
Setzt das Look-and-Feel-Objekt, welches diese Komponente zeichnet.
public void updateUI()
Setzt die UI Properties auf die Werte vom aktuelle Look-and-Feel zurück.
public String getUIClassID()
Liefert den Namen der Look-and-Feel-Klasse, die diese Komponente rendert.
protected boolean isRootPaneCheckingEnabled()
Liefert true, wenn eine Exception ausgelöst werden soll, wenn der Benutzer zu dem Fenster direkt Komponenten hinzufügt, ohne die Content-Pane zu benutzen.
protected void setRootPaneCheckingEnabled(boolean enabled)
Setzt fest, ob eine Exception ausgelöst werden soll, wenn der Programmierer Komponenten direkt dieser Komponente hinzugefügt, statt über das Content-Pane zu gehen.
protected void addImpl(Component comp, Object constraints, int index)
Sichert, dass Kinder nicht direkt hinzugefügt werden können.
public void remove(Component comp)
Entfernt die angegebene Komponente.
public void setLayout(LayoutManager manager)
Sichert, dass das Layout nicht direkt gesetzt werden kann.
public JMenuBar getMenuBar()
Liefert die aktuelle JMenubar.
public JMenuBar getJMenuBar()
Liefert die aktuelle JMenubar.
public void setMenuBar(JMenuBar m)
Setzt die Menüleiste.
public void setJMenuBar(JMenuBar m)
Setzt die Menüleiste.
public Container getContentPane()
Liefert die Content-Pane.
public void setContentPane(Container c)
Setzt die Content-Pane.
public JLayeredPane getLayeredPane()
Liefert das JLayeredPane-Exemplar.
public void setLayeredPane(JLayeredPane layered)
Setzt das JLayeredPane-Exemplar.
public Component getGlassPane()
Liefert das Glass-Pane.
public void setGlassPane(Component glass)
Setzt das Glass-Pane.
public JRootPane getRootPane()
Liefert das JRootPane-Exemplar.
protected void setRootPane(JRootPane root)
Setzt das JRootPane-Exemplar.
public void setClosable(boolean b)
Gibt an, ob das Fenster schließbar sein soll.
public boolean isClosable()
Gibt an, ob das Fenster schließbar ist.
public boolean isClosed()
Gibt an, ob das Fenster geschlossen ist.
public void setClosed(boolean b)
Gibt an, ob das Fenster geschlossen werden soll. Zunächst wird ein INTERNAL_FRAME_CLOSING-Event ausgelöst. Danach wird das die Eigenschaft closed auf true gesetzt. Nach dem eigentlichen Schließen des Fensters wird zum Abschluss ein INTERNAL_FRAME_CLOSED-Event ausgelöst.
Exception: PropertyVetoException
public void setResizable(boolean b)
Gibt an, ob das Fenster in der Größe veränderbar ist.
public boolean isResizable()
Liefert die Aussage, ob das Fenster in der Größe verändert werden kann.
public void setIconifiable(boolean b)
Gibt an, ob das Fenster ikonifiziert werden darf.
public boolean isIconifiable()
Liefert die Aussage, ob das Fenster ikonifiziert werden kann.
public boolean isIcon()
Liefert die Aussage, ob das Fenster gerade ikonifiziert ist.
public void setIcon(boolean b)
Wenn der Parameter true ist, wird das Fenster ikonifiziert.
Exception: PropertyVetoException
public void setMaximizable(boolean b)
Gibt an, ob das Fenster maximiert werden soll.
public boolean isMaximizable()
Liefert die Aussage, ob das Fenster maximiert angezeigt werden kann.
public boolean isMaximum()
Liefert die Aussage, ob das Fenster maximiert angezeigt wird.
public void setMaximum(boolean b)
Maximiert das Fenster wenn der Parameter true gesetzt wird.
Exception: PropertyVetoException
public String getTitle()
Liefert den Titel des Fensters.
public void setTitle(String title)
Setzt den Titel des Fensters.
public void setSelected(boolean selected)
Selektiert oder deselektiert das Fenster.
Exception: PropertyVetoException
public boolean isSelected()
Liefert die Aussage, ob das Fenster zur Zeit selektiert ist.
public void setFrameIcon(Icon icon)
Setzt die Grafik, die beim Fenster links oben in der Titelzeile angezeigt wird.
public Icon getFrameIcon()
Liefert das in der Titelzeile angezeigte Icon.
public void moveToFront()
Bewegt das Fenster nach Vorne.
public void moveToBack()
Bewegt das Fenster nach Hinten.
public void setLayer(Integer layer)
Setzt das Fenster auf die angegebene Ebene.
public void setLayer(int layer)     [1.3]
Setzt das Fenster auf die angegebene Ebene.
public int getLayer()
Liefert die Ebene, in der sich das Fenster befindet.
public JDesktopPane getDesktopPane()
Liefert das JDesktopPane, wenn vorhanden.
public void setDesktopIcon(JInternalFrame.JDesktopIcon d)
Setzt das Desktop-Icon.
public JInternalFrame.JDesktopIcon getDesktopIcon()
Liefert das Desktop-Icon.
public Rectangle getNormalBounds()     [1.3]
Liefert die Größe des Fensters als wenn es nicht maximiert ist.
public void setNormalBounds(Rectangle r)     [1.3]
Setzt die unmaximierte Größe des Fensters.
public Component getFocusOwner()     [1.3]
Wenn das Fenster selektiert ist, wird das Kind zurückgeliefert, das den Fokus besitzt. Ansonsten null.
public Component getMostRecentFocusOwner()     [1.4]
Liefert das Kindelement, das den Fokus bekommt, wenn das Fenster selektiert wird.
public void restoreSubcomponentFocus()     [1.3]
Das Fenster wird gebeten, nach einer Selektion den Fokus an die passende Stelle zu setzen.
public void reshape(int x, int y, int width, int height)
Bewegt und skaliert das Fenster.
public void addInternalFrameListener(InternalFrameListener l)
Fügt ein Listener zur Liste der Listener hinzu.
public void removeInternalFrameListener(InternalFrameListener l)
Entfernt den angegebenen Listener.
public InternalFrameListener[] getInternalFrameListeners()     [1.4]
Liefert alle Listener.
protected void fireInternalFrameEvent(int id)
Löst einen InternalFrameEvent des Typs InternalFrameEvent.INTERNAL_FRAME_OPENED, InternalFrameEvent.INTERNAL_FRAME_CLOSING, InternalFrameEvent.INTERNAL_FRAME_CLOSED, InternalFrameEvent.INTERNAL_FRAME_ICONIFIED, InternalFrameEvent.INTERNAL_FRAME_DEICONIFIED, InternalFrameEvent.INTERNAL_FRAME_ACTIVATED oder InternalFrameEvent.INTERNAL_FRAME_DEACTIVATED aus.
public void doDefaultCloseAction()     [1.3]
Löst ein INTERNAL_FRAME_CLOSING-Event aus und führt dann die angegebene Aktion aus (definiert in setDefaultCloseOperation(int op)).
public void setDefaultCloseOperation(int operation)
Setzt die Aktion beim Schließen des Fensters auf eine der Werte WindowConstants.DO_NOTHING_ON_CLOSE (der Programmierer muss auf das Schließen reagieren), WindowConstants.HIDE_ON_CLOSE (das Fenster wird unsichtbar) oder WindowConstants.DISPOSE_ON_CLOSE (das Fenster wird entfernt).
public int getDefaultCloseOperation()
Liefert die Regel, die beim Schließen des Fenster angewand werden soll.
public void pack()
Skaliert das Fenster so dass alle Elemente nach ihrer präferrierten Größe angeordnet sind.
public void show()
Zeigt das Fenster an und löst ein INTERNAL_FRAME_OPENED-Event aus.
public void dispose()
Schließt das Fenster und löst ggf. ein INTERNAL_FRAME_CLOSED-Event aus.
public void toFront()
Bringt das Fenster nach vorne.
public void toBack()
Stellt das Fenster nach hinten.
public final void setFocusCycleRoot(boolean focusCycleRoot)     [1.4]
Macht nichts, da das Fenster schon die Wurzel des Fokus-Kreises ist.
public final boolean isFocusCycleRoot()     [1.4]
Liefert true.
public final Container getFocusCycleRootAncestor()     [1.4]
Liefert immer null, da JInternalFrames sind immer die Wurzel des Fokus-Kreises.
public final String getWarningString()
Liefert immer null, da dieses Fenster immer innerhalb eines anderen Fensters (JFrame, JDialog oder JDialog) angezeigt wird. Nur in dem äußeren Fenster kann der Sicherheitshinweis bei unsicheren Applikationen kommen.
protected String paramString()
Liefert eine String-Repräsentation dieser Komponente für Debugging-Zwecke. Unterschiedliche VMs können hierbei unterschiedliche Ergebnisse liefern.
protected void paintComponent(Graphics g)
Überschrieben um eine optimiertere Anzeige beim Drag-Vorgang zeigen zu können.
public AccessibleContext getAccessibleContext()
Liefert das AccessibleContext-Exemplar zu dieser Komponente.


 Inhaltsverzeichnis   Vorhergehendes Paket   Seite Zurück   Seite Vor   Nächstes Paket   Paketübersicht   Index

Copyright © 2002 dpunkt.Verlag, Heidelberg. Alle Rechte vorbehalten.