モジュール java.desktop
パッケージ javax.swing

クラスDefaultDesktopManager

java.lang.Object
javax.swing.DefaultDesktopManager
すべての実装されたインタフェース:
Serializable, DesktopManager

public class DefaultDesktopManager
extends Object
implements DesktopManager, Serializable
DesktopManagerの実装です。 現時点では、任意の親でJInternalFrameを管理するための基本動作を実装します。 JDesktopの子でないJInternalFrameは、このコンポーネントを使ってそのデスクトップ様式のアクションを処理します。

このクラスはさまざまなJInternalFrameメソッドにポリシーを提供しますが、直接呼び出されるものではなく、さまざまなJInternalFrameメソッドがDesktopManagerに呼び込まれます。

導入されたバージョン:
1.2
関連項目:
JDesktopPane, JInternalFrame
  • コンストラクタの詳細

    • DefaultDesktopManager

      public DefaultDesktopManager()
  • メソッドの詳細

    • openFrame

      public void openFrame​(JInternalFrame f)
      このメソッドは通常は呼び出されません。 そうであれば、フレームのdesktopIconから適切な親を決定しようとします。 フレームが正常に追加されると、desktopIconをその親から削除します。
      定義:
      openFrame、インタフェース: DesktopManager
      パラメータ:
      f - 表示されるJInternalFrame
    • closeFrame

      public void closeFrame​(JInternalFrame f)
      フレームを削除し、必要に応じてその親からdesktopIconを削除します。
      定義:
      closeFrame、インタフェース: DesktopManager
      パラメータ:
      f - 削除するJInternalFrame
    • maximizeFrame

      public void maximizeFrame​(JInternalFrame f)
      その親の境界を満たすように、フレームのサイズを変更します。
      定義:
      maximizeFrame、インタフェース: DesktopManager
      パラメータ:
      f - サイズを変更するフレーム
    • minimizeFrame

      public void minimizeFrame​(JInternalFrame f)
      maximizeFrameの呼出し前のサイズと位置にフレームを復元します。
      定義:
      minimizeFrame、インタフェース: DesktopManager
      パラメータ:
      f - 復元するJInternalFrame
    • iconifyFrame

      public void iconifyFrame​(JInternalFrame f)
      フレームをその親から削除して、そのdesktopIconを親に追加します。
      定義:
      iconifyFrame、インタフェース: DesktopManager
      パラメータ:
      f - アイコン化するJInternalFrame
    • deiconifyFrame

      public void deiconifyFrame​(JInternalFrame f)
      desktopIconをその親から削除して、そのフレームを親に追加します。
      定義:
      deiconifyFrame、インタフェース: DesktopManager
      パラメータ:
      f - アイコン化解除するJInternalFrame
    • activateFrame

      public void activateFrame​(JInternalFrame f)
      fをアクティブにして、フロントに移動します。 現在アクティブなフレームがある場合は、そのフレームのIS_SELECTED_PROPERTYfalseに設定されます。 アクティブなフレームは、レイヤー全体で1つだけです。
      定義:
      activateFrame、インタフェース: DesktopManager
      パラメータ:
      f - アクティブにするJInternalFrame
    • dragFrame

      public void dragFrame​(JComponent f, int newX, int newY)
      ドラッグされているフレームの可視位置を指定された位置に移動します。 移動の方法は使用中のドラッグ・アルゴリズムによって変わる場合があります。 フレームの実際の論理位置は、endDraggingFrameが呼び出されるまで変更されないことがあります。
      定義:
      dragFrame、インタフェース: DesktopManager
      パラメータ:
      f - ドラッグ中のJComponent
      newX - 新しいx座標
      newY - 新しいy座標
    • resizeFrame

      public void resizeFrame​(JComponent f, int newX, int newY, int newWidth, int newHeight)
      新しい値を指定してsetBoundsForFrameを呼び出します。
      定義:
      resizeFrame、インタフェース: DesktopManager
      パラメータ:
      f - サイズ変更されるコンポーネント
      newX - 新しいx座標
      newY - 新しいy座標
      newWidth - 新しい幅
      newHeight - 新しい高さ
    • setBoundsForFrame

      public void setBoundsForFrame​(JComponent f, int newX, int newY, int newWidth, int newHeight)
      JComponentを移動して、影響を受けた領域を再描画します。
      定義:
      setBoundsForFrame、インタフェース: DesktopManager
      パラメータ:
      f - JComponentが移動またはサイズ変更されています
      newX - 新しいx座標
      newY - 新しいy座標
      newWidth - 新しい幅
      newHeight - 新しい高さ
    • removeIconFor

      protected void removeIconFor​(JInternalFrame f)
      fのdesktopIconを削除する簡易メソッドが必要です。
      パラメータ:
      f - desktopIconを削除するJInternalFrame
    • getBoundsForIconOf

      protected Rectangle getBoundsForIconOf​(JInternalFrame f)
      iconifyFrame()コードはこれを呼び出して、desktopIconの適切な境界を判断します。
      パラメータ:
      f - 対象のJInternalFrame
      戻り値:
      desktopIconの境界を含むRectangle
    • setPreviousBounds

      protected void setPreviousBounds​(JInternalFrame f, Rectangle r)
      コンポーネントの境界を、最大呼出しの直前に格納します。
      パラメータ:
      f - サイズ変更されるコンポーネント
      r - ほかの媒体に保存される通常の境界
    • getPreviousBounds

      protected Rectangle getPreviousBounds​(JInternalFrame f)
      コンポーネントの通常の境界をコンポーネント最大化の直前に返します。
      パラメータ:
      f - 対象のJInternalFrame
      戻り値:
      コンポーネントの通常の境界
    • setWasIcon

      protected void setWasIcon​(JInternalFrame f, Boolean value)
      コンポーネントがアイコン化されてdesktopIconの境界が有効であるように設定します。
      パラメータ:
      f - 対象のJInternalFrame
      value - コンポーネントがアイコン化されているかどうかを示すBoolean
    • wasIcon

      protected boolean wasIcon​(JInternalFrame f)
      コンポーネントがアイコン化されてdesktopIconの境界が有効であればtrue、そうでない場合はfalseを返します。
      パラメータ:
      f - 対象のJInternalFrame
      戻り値:
      コンポーネントがアイコン化されている場合はtrue、そうでない場合はfalse