com.jniwrapper.win32.jexcel
Class Window

java.lang.Object
  extended bycom.jniwrapper.win32.jexcel.BaseClass
      extended bycom.jniwrapper.win32.jexcel.Window

public class Window
extends com.jniwrapper.win32.jexcel.BaseClass

This class provides functionality for working with Excel windows.


Nested Class Summary
static class Window.State
          This class is an enumeration of supported window states.
 
Method Summary
 void activate()
          Activates the window.
 Application getApplication()
          Returns the parent application.
 java.lang.String getCaption()
          Returns the caption of the window.
 int getHeight()
          Returns the current height of the window in pixels.
 int getIndex()
          Returns the index number of the window.
 com.jniwrapper.win32.automation.OleMessageLoop getOleMessageLoop()
          Returns the message loop thread for processing native peer function calls.
 com.jniwrapper.win32.excel.Window getPeer()
          Returns the appropriate native peer.
 Window.State getState()
          Returns the window state.
 int getWidth()
          Returns the current width of the window in pixels.
 GenericWorkbook getWorkbook()
          Returns the contained workbook.
 double getZoom()
          Returns the document zoom in percents.
 boolean isVisible()
          Checked if the window in shown.
 void setCaption(java.lang.String caption)
          Sets up the caption of the window.
 void setHeight(int height)
          Sets up the height of the window.
 void setState(Window.State state)
          Changes the window state.
 void setVisible(boolean visible)
          Sets up the visibility of the window.
 void setWidth(int width)
          Sets up the width of the window.
 void setZoom(double zoom)
          Specifies the document zoom in percents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getPeer

public com.jniwrapper.win32.excel.Window getPeer()
Returns the appropriate native peer.

Returns:
the appropriate native peer.

getCaption

public java.lang.String getCaption()
Returns the caption of the window.

Returns:
the caption of the window.

setCaption

public void setCaption(java.lang.String caption)
Sets up the caption of the window.

Parameters:
caption - is the caption to be set up.
Throws:
java.lang.IllegalArgumentException - the specified caption is null.

activate

public void activate()
Activates the window.


getWorkbook

public GenericWorkbook getWorkbook()
Returns the contained workbook.

Returns:
the contained workbook.

getIndex

public int getIndex()
Returns the index number of the window.

Returns:
the index number of the window.

setHeight

public void setHeight(int height)
Sets up the height of the window. NOTE: The height can be modified only if the window is in @link State.NORMAL state.

Parameters:
height - is the height in pixels to be set up.
Throws:
java.lang.IllegalArgumentException - if the specified height is negative or cannot be set up.
java.lang.IllegalStateException - if the window is not in @link State.NORMAL state.

getHeight

public int getHeight()
Returns the current height of the window in pixels.

Returns:
the current height of the window.

setWidth

public void setWidth(int width)
Sets up the width of the window. NOTE: The width can be modified only if the window is in @link State.NORMAL state.

Parameters:
width - is the width in pixels to be set up.
Throws:
java.lang.IllegalArgumentException - if the specified width is negative or cannot be set up.
java.lang.IllegalStateException - if the window is not in @link State.NORMAL state.

getWidth

public int getWidth()
Returns the current width of the window in pixels.

Returns:
the current width of the window.

isVisible

public boolean isVisible()
Checked if the window in shown.

Returns:
true if the window is shown.

setVisible

public void setVisible(boolean visible)
Sets up the visibility of the window.

Parameters:
visible - is a state to set up.

getZoom

public double getZoom()
Returns the document zoom in percents.

Returns:
the document zoom in percents.

setZoom

public void setZoom(double zoom)
Specifies the document zoom in percents.

Parameters:
zoom - is the document zoom in percents.
Throws:
java.lang.IllegalArgumentException - if the specified zoom cannot be set up.

setState

public void setState(Window.State state)
Changes the window state.

Parameters:
state - is a new state.
Throws:
java.lang.IllegalArgumentException - if the tager state is null.
See Also:
Window.State

getState

public Window.State getState()
Returns the window state.

Returns:
the window state.
See Also:
Window.State

getOleMessageLoop

public com.jniwrapper.win32.automation.OleMessageLoop getOleMessageLoop()
Returns the message loop thread for processing native peer function calls.

Returns:
the message loop thread for processing native peer function calls.

getApplication

public Application getApplication()
Returns the parent application.

Returns:
the parent application.