|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JLayeredPane
jlink.flowchart.JLPage
public class JLPage
Creates a page-like background that enables WYSIWYG (What You See Is What You Get) editing and display of flowchart components. This provides basic functionality for all other types of containers to build on and add increasingly more complex rules to.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JLayeredPane |
---|
javax.swing.JLayeredPane.AccessibleJLayeredPane |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected boolean |
bgTransparency
Deprecated. Use PAGE_TRANSPARENT and setJLPageType(int type) instead. |
protected boolean |
bordersOn
JLPage property that holds information about if the page will have borders around it or
not. |
protected int |
bottomMargin
Bottom margin for this JLPage . |
protected java.awt.Color |
containerBackgroundColor
JLPage property with information about the color of the background. |
protected java.awt.Color |
containerBorderColor
JLPage property that holds information about the border color. |
protected java.awt.Color |
containerShadowColor
JLPage property with information about the color of the shadows. |
static float |
CONVERT_CM_IN
Converts centimetre to inch. |
static float |
CONVERT_IN_CM
Converts inch to centimetre. inValue*JLPage.CONVERT_IN_CM = cmValue |
protected int |
currentOrientation
The orientation property of JLPage . |
protected int |
h
JLPage height property in pixels. |
protected int |
leftMargin
Left margin for this JLPage . |
protected boolean |
marginsOn
Margins property of JLPage . |
static int |
ORIENTATION_LANDSCAPE
Integer constant to specify an orientation of JLPage such that the width is larger
than the height. |
static int |
ORIENTATION_PORTRAIT
Integer constant to specify an orientation of JLPage such that the width is smaller
than the height. |
static int |
ORIENTATION_SQUARE
Integer constant to specify an orientation of JLPage such that the width is equal
to the height. |
static int |
PAGE_A4
Integer constant to specify a page type of A4. |
static int |
PAGE_PAPER
Integer constant indicating a JLPage of paper type. |
static int |
PAGE_PLAIN
Integer constant indicating a JLPage of pail type. |
static int |
PAGE_TRANSPARENT
A transparent JLPage that has no background, borders, or shadows. |
protected int |
pageType
The current page type of this JLPage . |
protected int |
rightMargin
Right margin for this JLPage . |
static int |
SCREEN_HEIGHT
An integer constant that is the height of the screen in its value. |
static int |
SCREEN_RESOLUTION
An integer constant that is the resolution of the screen in its value. |
static int |
SCREEN_WIDTH
An integer constant that is the width of the screen in its value. |
protected boolean |
shadowsOn
JLPage property with information about if shadows are on. |
protected int |
topMargin
Top margin for this JLPage . |
static int |
UNIT_CM
Integer constant to clarify what type of units are being used. |
static int |
UNIT_INCH
Integer constant to clarify what type of units are being used. |
static int |
UNIT_PIXEL
Integer constant to clarify what type of units are being used. |
protected int |
w
JLPage width property in pixels. |
Fields inherited from class javax.swing.JLayeredPane |
---|
DEFAULT_LAYER, DRAG_LAYER, FRAME_CONTENT_LAYER, LAYER_PROPERTY, MODAL_LAYER, PALETTE_LAYER, POPUP_LAYER |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
JLPage()
Creates a new instance of JLPage |
Method Summary | |
---|---|
float |
convertCM_TO_INCH(float cm)
Converts centimetres to inches. |
int |
convertCM_TO_PIXEL(float cm)
Converts centimetres to an on-screen equivalent in pixels (so that the size is equal in life and screen). |
float |
convertINCH_TO_CM(float inch)
Converts inches to centimetres. |
int |
convertINCH_TO_PIXEL(float inch)
Converts inches to an on-screen equivalent in pixels (so that the size is equal in life and screen). |
float |
convertPIXEL_TO_CM(int pixel)
Converts a pixel distance on-screen to a physical size in centimertres. |
float |
convertPIXEL_TO_INCH(int pixel)
Converts a pixel distance on-screen to a physical size in inches. |
java.awt.Color |
getBackground()
Returns the background color of this JLPage . |
java.awt.Color |
getJLPageBorderColor()
Gets the color of the borders around JLPage . |
float |
getJLPageCmHeight()
The height of this JLPage in centimetres. |
float |
getJLPageCmWidth()
|
int |
getJLPageHeight()
Get the height of this JLPage . |
float |
getJLPageInchHeight()
The height of this JLPage in inches. |
float |
getJLPageInchWidth()
|
int |
getJLPageOrientation()
Test to determine the orientation of JLPage . |
java.awt.Color |
getJLPageShadowColor()
Gets the color of the shadows of JLPage . |
java.awt.Dimension |
getJLPageSize()
Get the size of this JLPage as a Dimension . |
java.awt.Dimension |
getJLPageSize(int unitType)
Get the size of this JLPage as a Dimension . |
int |
getJLPageType()
Gives information about the type of page that this JLPage is representing. |
int |
getJLPageWidth()
Get the width of this JLPage in pixels. |
int[] |
getMargins()
Returns the margins of this JLPage as an array. |
java.lang.String |
getUIClassID()
Returns the UI string for JLPage which is PageUI.UI_CLASS_ID |
boolean |
isBackgroundTransparent()
Deprecated. Use getJLPageType() to test if the JLPage is transparent. |
boolean |
isBordersOn()
Boolean test to see if the JLPage is using borders. |
boolean |
isFocusable()
JLPage is always a focusable component. |
boolean |
isMarginsOn()
Tests if the margins are on and being used in this JLPage . |
boolean |
isShadowsOn()
Tests if the shadows are on and being used by JLPage . |
void |
setBackground(java.awt.Color c)
Sets the background color of this JLPage . |
void |
setBordersOn(boolean value)
Turns JLPage borders either on or off depending on the parameters. |
void |
setBottomMargin(int value)
Individually sets the bottom margin of this JLPage . |
void |
setJLPageBorderColor(java.awt.Color c)
Sets the border color of the JLPage . |
void |
setJLPageHeight(int height)
Sets the height alone of this JLPage in pixels. |
void |
setJLPageOrientation(int orientation)
Sets the orientation of this JLPage to be one of two integer constants:
ORIENTATION_PORTRAIT or ORIENTATION_LANDSCAPE . |
void |
setJLPageShadowColor(java.awt.Color c)
Sets the color of the shadows of JLPage . |
void |
setJLPageSize(java.awt.Dimension d)
Sets the size of this JLPage . |
void |
setJLPageSize(java.awt.Dimension d,
int unitType)
Sets the size of this JLPage . |
void |
setJLPageSize(int width,
int height)
Set the size of this JLPage . |
void |
setJLPageType(int type)
Set the JLPage to a type of page. |
void |
setJLPageWidth(int width)
Sets the width alone of this JLPage in pixels. |
void |
setLeftMargin(int value)
Individually sets the left margin of this JLPage . |
void |
setMargins(int top,
int left,
int bottom,
int right)
Sets the margins of the JLPage . |
void |
setMarginsOn(boolean value)
Either turns on or off the usage of margins in the JLPage . |
void |
setRightMargin(int value)
Individually sets the right margin of this JLPage . |
void |
setShadowsOn(boolean value)
Turns shadows either on or off in this JLPage . |
void |
setSize(java.awt.Dimension d)
Sets the size of this JLPage by calling the setJLPageSize(Dimension d) method. |
void |
setSize(int width,
int height)
Set the size of this JLPage by calling setJLPageSize(int width, int height) |
void |
setTopMargin(int value)
Individually sets the top margin of this JLPage . |
void |
setUI(JLPageUI ui)
Sets the UI of this JLPage . |
void |
turnOffBackgroundTransparency()
Deprecated. Use setJLPageType(int type) instead. Stability not certain. |
void |
turnOffBorders()
Turns off the borders for JLPage . |
void |
turnOffMargins()
Turns off the usage of margins in the JLPage . |
void |
turnOffShadows()
Turns off shadows in this JLPage . |
void |
turnOnBackgroundTransparency()
Deprecated. Use setJLPageType(int type) instead. Stability not certain. |
void |
turnOnBorders()
Turns on the borders for JLPage . |
void |
turnOnMargins()
Turns on the usage of margins in the JLPage . |
void |
turnOnShadows()
Turns on shadows in this JLPage . |
void |
updateUI()
|
Methods inherited from class javax.swing.JLayeredPane |
---|
addImpl, getAccessibleContext, getComponentCountInLayer, getComponentsInLayer, getComponentToLayer, getIndexOf, getLayer, getLayer, getLayeredPaneAbove, getObjectForLayer, getPosition, highestLayer, insertIndexForLayer, isOptimizedDrawingEnabled, lowestLayer, moveToBack, moveToFront, paint, paramString, putLayer, remove, removeAll, setLayer, setLayer, setPosition |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int PAGE_A4
By using this constant in setting the page type, the appropriate number of pixels will be used so as to create the same size image on screen. There will also be a border and a shadow so as to appear like paper on the monitor.
setJLPageType(int type)
,
Constant Field Valuespublic static final int PAGE_PAPER
JLPage
of paper type. These may have arbitrary sizes, but
will possess shadows on screen to simulate paper.
setJLPageType(int type)
,
Constant Field Valuespublic static final int PAGE_PLAIN
JLPage
of pail type. These may have arbitrary sizes, but
do not have shadows like paper types or A4 types to simulate paper, hence being plain.
setJLPageType(int type)
,
Constant Field Valuespublic static final int PAGE_TRANSPARENT
JLPage
that has no background, borders, or shadows.
setJLPageType(int type)
,
Constant Field Valuesprotected int pageType
JLPage
.
setJLPageType(int type)
protected boolean marginsOn
JLPage
. true
if margins are being used, false
if not.
Margins help prevent components from falling outside the boundaries of the JLPage
.
setMargins(int top, int left, int bottom, int right)
protected int topMargin
JLPage
. Default value is 0
setTopMargin(int value)
protected int leftMargin
JLPage
. Default value is 0
setLeftMargin(int value)
protected int bottomMargin
JLPage
. Default value is 0
setBottomMargin(int value)
protected int rightMargin
JLPage
. Default value is 0
setRightMargin(int value)
protected boolean bordersOn
JLPage
property that holds information about if the page will have borders around it or
not.
setBordersOn(boolean value)
protected java.awt.Color containerBorderColor
JLPage
property that holds information about the border color.
setJLPageBorderColor(Color c)
protected boolean shadowsOn
JLPage
property with information about if shadows are on.
protected java.awt.Color containerShadowColor
JLPage
property with information about the color of the shadows.
protected java.awt.Color containerBackgroundColor
JLPage
property with information about the color of the background.
protected boolean bgTransparency
PAGE_TRANSPARENT
and setJLPageType(int type)
instead.JLPage
property with information about the transparency status of the background. The
default value is false
meaning that the background is not transparent.
protected int w
JLPage
width property in pixels. Default of 200.
protected int h
JLPage
height property in pixels. Default of 200.
public static final int SCREEN_WIDTH
JLink
and upon creation of an instance of this class.
public static final int SCREEN_HEIGHT
JLink
and upon creation of an instance of this class.
public static final int SCREEN_RESOLUTION
JLink
and upon creation of an instance of this class. The resolution is given in the
form of pixels per inch.
public static final float CONVERT_CM_IN
cmValue*JLPage.CONVERT_CM_IN = inValue
public static final float CONVERT_IN_CM
inValue*JLPage.CONVERT_IN_CM = cmValue
public static final int UNIT_INCH
JLPage
can determine
how many pixels to draw on screen to create an on screen inch equivalent.
UNIT_CM
,
UNIT_PIXEL
,
Constant Field Valuespublic static final int UNIT_CM
JLPage
can determine
how many pixels to draw on screen to create an on screen centimetre equivalent.
UNIT_INCH
,
UNIT_PIXEL
,
Constant Field Valuespublic static final int UNIT_PIXEL
JLPage
can determine that
the units it is being given are pixels and not some other unit, in which case it will set distance based
on pixels and not inches or centimetres.
UNIT_CM
,
UNIT_INCH
,
Constant Field Valuespublic static final int ORIENTATION_PORTRAIT
JLPage
such that the width is smaller
than the height.
ORIENTATION_LANDSCAPE
,
ORIENTATION_SQUARE
,
setJLPageOrientation(int orientation)
,
Constant Field Valuespublic static final int ORIENTATION_LANDSCAPE
JLPage
such that the width is larger
than the height.
ORIENTATION_PORTRAIT
,
ORIENTATION_SQUARE
,
setJLPageOrientation(int orientation)
,
Constant Field Valuespublic static final int ORIENTATION_SQUARE
JLPage
such that the width is equal
to the height.
ORIENTATION_LANDSCAPE
,
ORIENTATION_PORTRAIT
,
setJLPageOrientation(int orientation)
,
Constant Field Valuesprotected int currentOrientation
JLPage
.
setJLPageOrientation(int orientation)
Constructor Detail |
---|
public JLPage()
JLPage
JLPage
Method Detail |
---|
public float convertCM_TO_INCH(float cm)
cm
- The value in centimetres.
public float convertINCH_TO_CM(float inch)
inch
- The value in inches.
public int convertCM_TO_PIXEL(float cm)
cm
- The value in centimetres.
public int convertINCH_TO_PIXEL(float inch)
inch
- The value in inches.
public float convertPIXEL_TO_INCH(int pixel)
pixel
- The pixel length.
public float convertPIXEL_TO_CM(int pixel)
pixel
- The pixel length.
public void setUI(JLPageUI ui)
UI
of this JLPage
. This takes a JLPageUI
as input (a standard implementation of a page, that other more advanced page formats can emulate).
ui
- The UI to set for this JLPage
.public void updateUI()
updateUI
in class javax.swing.JComponent
public java.lang.String getUIClassID()
JLPage
which is PageUI.UI_CLASS_ID
getUIClassID
in class javax.swing.JComponent
public void turnOnBackgroundTransparency()
setJLPageType(int type)
instead. Stability not certain.
public void turnOffBackgroundTransparency()
setJLPageType(int type)
instead. Stability not certain.
public boolean isBackgroundTransparent()
getJLPageType()
to test if the JLPage
is transparent.
JLPage
.public boolean isFocusable()
JLPage
is always a focusable component.
isFocusable
in class java.awt.Component
true
public void setSize(int width, int height)
JLPage
by calling setJLPageSize(int width, int height)
setSize
in class java.awt.Component
width
- The width to set.height
- The height to set.public void setJLPageSize(int width, int height)
JLPage
.
width
- The width to set.height
- The height to set.public void setSize(java.awt.Dimension d)
JLPage
by calling the setJLPageSize(Dimension d)
method.
setSize
in class java.awt.Component
d
- The size to set this JLPage
to be.public void setJLPageSize(java.awt.Dimension d)
JLPage
.
d
- Dimension with pixels as the units inside.public void setJLPageSize(java.awt.Dimension d, int unitType)
JLPage
.
d
- The size to set this JLPage
.unitType
- setJLPageSize(int width, int height)
public java.awt.Dimension getJLPageSize(int unitType)
JLPage
as a Dimension
.
unitType
- The desired units that this function should return. If set to UNIT_CM
will
return the size of this JLPage
as a Dimension
with centimetres in the width
and height values as opposed to pixels.
JLPage
in the specified units.public java.awt.Dimension getJLPageSize()
JLPage
as a Dimension
.
JLPage
in the Dimension
as pixels.public int getJLPageWidth()
JLPage
in pixels.
JLPage
in pixels.public float getJLPageCmWidth()
public float getJLPageInchWidth()
public void setJLPageWidth(int width)
JLPage
in pixels.
width
- The width to set.getJLPageWidth()
public int getJLPageHeight()
JLPage
.
JLPage
in pixels.public float getJLPageCmHeight()
JLPage
in centimetres.
public float getJLPageInchHeight()
JLPage
in inches.
public void setJLPageHeight(int height)
JLPage
in pixels.
height
- The height to set.getJLPageHeight()
public void setJLPageType(int type)
JLPage
to a type of page.
There are numerous types of page that can be set and displayed. These determine how JLPage
is drawn.
For instance:
PAGE_A4
is an A4 page drawn to real life size on screenPAGE_PAPER
looks like paper on screen but with an arbitrary sizePAGE_PLAIN
is a plain container without shadowsPAGE_TRANSPARENT
is completely see through (useful in web pages...)
type
- The integer constant to set this JLPage
to.public int getJLPageType()
JLPage
is representing.
There are numerous types of page that can be set and displayed. These determine how JLPage
is drawn.
For instance:
PAGE_A4
is an A4 page drawn to real life size on screenPAGE_PAPER
looks like paper on screen but with an arbitrary sizePAGE_PLAIN
is a plain container without shadowsPAGE_TRANSPARENT
is completely see through (useful in web pages...)JLPage
.
JLPage
.public void setJLPageOrientation(int orientation)
JLPage
to be one of two integer constants:
ORIENTATION_PORTRAIT
or ORIENTATION_LANDSCAPE
.If the current container size is square, this method returns without doing anything, otherwise, the container and its physical size will be molded to
orientation
- Either ORIENTATION_PORTRAIT
or ORIENTATION_LANDSCAPE
.public int getJLPageOrientation()
JLPage
. This method will do the following:
ORIENTATION_LANDSCAPE
if getJLPageWidth()
is larger than getJLPageHeight()
ORIENTATION_PORTRAIT
if getJLPageWidth()
is smaller than getJLPageHeight()
ORIENTATION_SQUARE
if getJLPageWidth()
is equal to getJLPageHeight()
-1
is returned.
JLPage
or if an error is encountered a -1
is returned.public void setBackground(java.awt.Color c)
JLPage
.
setBackground
in class javax.swing.JComponent
c
- The color to set as the background of this JLPage
.public java.awt.Color getBackground()
JLPage
.The background color is the color of the actual page itself (ie. what the components are added to.
getBackground
in class java.awt.Component
JLPage
.public void setJLPageBorderColor(java.awt.Color c)
JLPage
.
c
- The color to set the borders.public java.awt.Color getJLPageBorderColor()
JLPage
. This value defaults as black.
JLPage
.public void turnOnBorders()
JLPage
.
public void turnOffBorders()
JLPage
.
public void setBordersOn(boolean value)
JLPage
borders either on or off depending on the parameters.
value
- If true
turns on borders. If false
turns off borders.public boolean isBordersOn()
JLPage
is using borders.
true
if using borders, false
if not using borders.public void setJLPageShadowColor(java.awt.Color c)
JLPage
. This value defaults as black.
c
- The color to set the shadows to.public java.awt.Color getJLPageShadowColor()
JLPage
. This value defaults as black.
public void turnOnShadows()
JLPage
.
Shadows hang behind the JLPage
to make it look as though it were a real paper page on
screen.
public void turnOffShadows()
JLPage
.
Shadows hang behind the JLPage
to make it look as though it were a real paper page on
screen.
public void setShadowsOn(boolean value)
JLPage
.
Shadows hang behind the JLPage
to make it look as though it were a real paper page on
screen.
value
- true
turns on shadows, false
turns off shadows.public boolean isShadowsOn()
JLPage
.
Shadows hang behind the JLPage
to make it look as though it were a real paper page on
screen.
true
if the shadows are on and false
if they are off.public void turnOnMargins()
JLPage
.
Margins are used to stop components from being dragged off the JLPage
.
public void turnOffMargins()
JLPage
.
Margins are used to stop components from being dragged off the JLPage
.
public void setMarginsOn(boolean value)
JLPage
.
Margins are used to stop components from being dragged off the JLPage
.
value
- Turns margins on if true
and off if false
.public boolean isMarginsOn()
JLPage
.Margins are used to stop components from being dragged off the side of the page.
true
if the margins are on and false
if they are off.public void setTopMargin(int value)
JLPage
.
value
- The value to set the top margin to.public void setLeftMargin(int value)
JLPage
.
value
- The value to set the left margin to.public void setBottomMargin(int value)
JLPage
.
value
- The value to set the bottom margin to.public void setRightMargin(int value)
JLPage
.
value
- The value to set the right margin to.public void setMargins(int top, int left, int bottom, int right)
JLPage
.
top
- The top margin of this JLPage
.left
- The left margin of this JLPage
.bottom
- The bottom margin of this JLPage
.right
- The right margin of this JLPage
.public int[] getMargins()
JLPage
as an array.
int[] margins = {this.topMargin, this.leftMargin, this.bottomMargin, this.rightMargin}
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |