java.lang.Objectjavax.swing.DefaultDesktopManager
public class DefaultDesktopManager
This is an implementation of the DesktopManager.
It currently implements the basic behaviors for managing
JInternalFrames in an arbitrary parent.
JInternalFrames that are not children of a
JDesktop will use this component
to handle their desktop-like actions.
This class provides a policy for the various JInternalFrame methods, it is not meant to be called directly rather the various JInternalFrame methods will call into the DesktopManager.
JDesktopPane,
JInternalFrame| Constructor Summary | |
|---|---|
DefaultDesktopManager()
|
|
| Method Summary | |
|---|---|
void |
activateFrame(JInternalFrame f)
This will activate f moving it to the front. |
void |
beginDraggingFrame(JComponent f)
This method is normally called when the user has indicated that they will begin dragging a component around. |
void |
beginResizingFrame(JComponent f,
int direction)
This methods is normally called when the user has indicated that they will begin resizing the frame. |
void |
closeFrame(JInternalFrame f)
Removes the frame, and, if necessary, the desktopIcon, from its parent. |
void |
deactivateFrame(JInternalFrame f)
Generally, indicate that this frame has lost focus. |
void |
deiconifyFrame(JInternalFrame f)
Removes the desktopIcon from its parent and adds its frame to the parent. |
void |
dragFrame(JComponent f,
int newX,
int newY)
Moves the visible location of the frame being dragged to the location specified. |
void |
endDraggingFrame(JComponent f)
This method signals the end of the dragging session. |
void |
endResizingFrame(JComponent f)
This method signals the end of the resize session. |
protected Rectangle |
getBoundsForIconOf(JInternalFrame f)
The iconifyFrame() code calls this to determine the proper bounds for the desktopIcon. |
protected Rectangle |
getPreviousBounds(JInternalFrame f)
Gets the normal bounds of the component prior to the component being maximized. |
void |
iconifyFrame(JInternalFrame f)
Removes the frame from its parent and adds its desktopIcon to the parent. |
void |
maximizeFrame(JInternalFrame f)
Resizes the frame to fill its parents bounds. |
void |
minimizeFrame(JInternalFrame f)
Restores the frame back to its size and position prior to a maximizeFrame call. |
void |
openFrame(JInternalFrame f)
Normally this method will not be called. |
protected void |
removeIconFor(JInternalFrame f)
Convenience method to remove the desktopIcon of f is necessary. |
void |
resizeFrame(JComponent f,
int newX,
int newY,
int newWidth,
int newHeight)
Calls setBoundsForFrame with the new values. |
void |
setBoundsForFrame(JComponent f,
int newX,
int newY,
int newWidth,
int newHeight)
This moves the JComponent and repaints the damaged areas. |
protected void |
setPreviousBounds(JInternalFrame f,
Rectangle r)
Stores the bounds of the component just before a maximize call. |
protected void |
setWasIcon(JInternalFrame f,
Boolean value)
Sets that the component has been iconized and the bounds of the desktopIcon are valid. |
protected boolean |
wasIcon(JInternalFrame f)
Returns true if the component has been iconized
and the bounds of the desktopIcon are valid,
otherwise returns false. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultDesktopManager()
| Method Detail |
|---|
public void openFrame(JInternalFrame f)
openFrame in interface DesktopManagerpublic void closeFrame(JInternalFrame f)
desktopIcon, from its parent.
closeFrame in interface DesktopManagerf - the JInternalFrame to be removedpublic void maximizeFrame(JInternalFrame f)
maximizeFrame in interface DesktopManagerf - the frame to be resizedpublic void minimizeFrame(JInternalFrame f)
maximizeFrame call.
minimizeFrame in interface DesktopManagerf - the JInternalFrame to be restoredpublic void iconifyFrame(JInternalFrame f)
desktopIcon to the parent.
iconifyFrame in interface DesktopManagerf - the JInternalFrame to be iconifiedpublic void deiconifyFrame(JInternalFrame f)
deiconifyFrame in interface DesktopManagerf - the JInternalFrame to be de-iconifiedpublic void activateFrame(JInternalFrame f)
IS_SELECTED_PROPERTY to false.
There can be only one active frame across all Layers.
activateFrame in interface DesktopManagerf - the JInternalFrame to be activatedpublic void deactivateFrame(JInternalFrame f)
DesktopManager
deactivateFrame in interface DesktopManagerpublic void beginDraggingFrame(JComponent f)
DesktopManager
beginDraggingFrame in interface DesktopManagerpublic void dragFrame(JComponent f, int newX, int newY)
endDraggingFrame is called.
dragFrame in interface DesktopManagerpublic void endDraggingFrame(JComponent f)
DesktopManager
endDraggingFrame in interface DesktopManagerpublic void beginResizingFrame(JComponent f, int direction)
DesktopManager
beginResizingFrame in interface DesktopManagerpublic void resizeFrame(JComponent f, int newX, int newY, int newWidth, int newHeight)
setBoundsForFrame with the new values.
resizeFrame in interface DesktopManagerf - the component to be resizednewX - the new x-coordinatenewY - the new y-coordinatenewWidth - the new widthnewHeight - the new heightpublic void endResizingFrame(JComponent f)
DesktopManager
endResizingFrame in interface DesktopManagerpublic void setBoundsForFrame(JComponent f, int newX, int newY, int newWidth, int newHeight)
JComponent and repaints the damaged areas.
setBoundsForFrame in interface DesktopManagerprotected void removeIconFor(JInternalFrame f)
protected Rectangle getBoundsForIconOf(JInternalFrame f)
protected void setPreviousBounds(JInternalFrame f, Rectangle r)
f - the component about to be resizedr - the normal bounds to be saved awayprotected Rectangle getPreviousBounds(JInternalFrame f)
f - the JInternalFrame of interest
protected void setWasIcon(JInternalFrame f, Boolean value)
desktopIcon are valid.
protected boolean wasIcon(JInternalFrame f)
true if the component has been iconized
and the bounds of the desktopIcon are valid,
otherwise returns false.
f - the JInternalFrame of interest
true if the component has been iconized;
otherwise returns falseCes informations proviennent du site de http://java.sun.com
Le contenu de cette page provient du site de Sun, et est généré depuis un cache sur l'infobrol après certains traitements automatisés. La présentation peut donc différer du document original, mais le contenu aussi. Vous pouvez utiliser ce bouton pour afficher la page originale du site de Sun :
Maintenir les pages en cache sur différents sites peut offrir plus de disponibilité.
Chaque page est indexée dans la base de donnée, ce qui permet de retrouver facilement les informations, au moyen des sommaires, du moteur de recherche interne, etc.
Des facilités sont mises en place pour que les membres de l'infobrol puissent effectuer des traductions en français des différents documents. Ceci devrait permettre aux débutants en programmation Java de consulter les API en français s'ils maîtrisent moins bien la langue de Shakespeare. Dans le cas où une traduction a été soumise, elle est disponible au moyen d'un lien en bas de page. Si la traduction a été validée, la page s'affiche par défaut en français, et un lien en bas de page permet d'atteindre la version en anglais.
Le code sur l'infobrol est automatiquement coloré selon la syntaxe, et les différents mots clés sont transformés en liens pour accéder rapidement aux informations.
Vous avez la possibilité de partager vos expériences en proposant vos propres extraits de code en utilisant le bouton "ajouter un commentaire" en bas de page. Si vous visitez simplement l'infobrol, vous avez déjà accès à cette fonction, mais si vous étes membre du brol, vous pouvez en plus utiliser des boutons supplémentaires de mise en forme, dont la coloration automatique de vos extraits de codes.
Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher les interactions avec les réseaux sociaux sur ces pages.
6 mots clés dont 0 définis manuellement (plus d'information...).
Avertissement
Cette page ne possède pas encore de mots clés manuels, ceci est donc un exemple automatique (les niveaux de pertinence sont fictifs, mais les liens sont valables). Pour tester le nuage avec une page qui contient des mots définis manuellement, vous pouvez cliquer ici.Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher le nuage de mots clés.
Recherche (afficher)
Utilisateur (masquer)
Navigation (masquer)
Apparence (afficher)
Stats (afficher)
Citation (masquer)