Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ccl.platform
Class Linux

    java.lang.Object
      |
      +--ccl.platform.Native
            |
            +--ccl.platform.Linux

public class Linux
extends Native

Linux native methods are invoked in this class. But users will use the Native class to use these methods.

Constructor Summary
`protected` | `Linux()` This is a singleton class.

Method Summary
`int` | `getMainJavaPID()` E.g.
`int` | `getPGID(int pid_)` Get process group id for a given pid.
`int` | `getPID()` Get Process ID of the current Java program/process.
`int` | `getPIDViaPOSIX()` Uses native POSIX 'getpid()' to get the process ID of the current Java program/process.
`int` | `getPIDViaProc()` Uses the /proc system to get the process ID of the current Java program/process.
`static java.lang.String` | `getWindowID(java.lang.String sFrameName_)` Get unix windows id.
`static java.lang.String` | `getWindowID(java.lang.String sFrameName_, int debug)` Get unix windows id.
`static boolean` | `isLibLoaded()` Is the libLinux.so library really loaded?
`static void` | `moveWindow(java.lang.String sFrameID_, int x, int y)` Moves an X window.
`static void` | `requestFocus(java.lang.String sFrameID_)` Set focus on Unix window's id.
`void` | `requestInputFocus(java.lang.String sWindowTitle_)` Set focus on Unix window with given title.
`void` | `setLocation(java.awt.Dialog dialog, int x, int y)` Sets the location of the dialog using X Window.
`void` | `setLocation(java.awt.Frame frame, int x, int y)` Sets the location of the frame using X Window.
`int` | `symlink(java.lang.String sOldPath_, java.lang.String sNewPath_)` Create a symbolic link.
`boolean` | `unlink(java.lang.String sPath_)` Remove a symbolic link.

Methods inherited from class ccl.platform.Native
`getInstance, getUserNames`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Linux

    protected Linux()

  This is a singleton class. Use 'Native.getInstance()' to create a Native or Linux object.

Method Detail

### getWindowID

    public static java.lang.String getWindowID(java.lang.String sFrameName_)

  Get unix windows id.

### getWindowID

    public static java.lang.String getWindowID(java.lang.String sFrameName_,
                                               int debug)

  Get unix windows id.

### requestFocus

    public static void requestFocus(java.lang.String sFrameID_)

  Set focus on Unix window's id.

### moveWindow

    public static void moveWindow(java.lang.String sFrameID_,
                                  int x,
                                  int y)

  Moves an X window.

### requestInputFocus

    public void requestInputFocus(java.lang.String sWindowTitle_)

  Set focus on Unix window with given title.

  Overrides:
    `requestInputFocus` in class `Native`

### symlink

    public int symlink(java.lang.String sOldPath_,
                       java.lang.String sNewPath_)

  Create a symbolic link.

  Overrides:
    `symlink` in class `Native`

### unlink

    public boolean unlink(java.lang.String sPath_)

  Remove a symbolic link.

  Overrides:
    `unlink` in class `Native`

### isLibLoaded

    public static boolean isLibLoaded()

  Is the libLinux.so library really loaded?

### getPIDViaPOSIX

    public int getPIDViaPOSIX()

  Uses native POSIX 'getpid()' to get the process ID of the current Java program/process.

### getPIDViaProc

    public int getPIDViaProc()

  Uses the /proc system to get the process ID of the current Java program/process. This method exists only in the Linux class, not in the Native super class (makes no sense outside of Linux).

### getPID

    public int getPID()

  Get Process ID of the current Java program/process.

  Overrides:
    `getPID` in class `Native`

### getMainJavaPID

    public int getMainJavaPID()

  E.g. in IBM's JDK 1.3 for Linux multiple processes are started. getPID() returns the current process ID. This method returns the main Java process ID.

  Overrides:
    `getMainJavaPID` in class `Native`

### getPGID

    public int getPGID(int pid_)

  Get process group id for a given pid. Use pid = 0 to get the pgrpid of the current process.

### setLocation

    public void setLocation(java.awt.Frame frame,
                            int x,
                            int y)

  Sets the location of the frame using X Window. The wrong window might be change if there are two with the same title.

  Overrides:
    `setLocation` in class `Native`

### setLocation

    public void setLocation(java.awt.Dialog dialog,
                            int x,
                            int y)

  Sets the location of the dialog using X Window. The wrong window might be change if there are two with the same title.

  Overrides:
    `setLocation` in class `Native`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD