Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Draw2d
3.3

org.eclipse.draw2d.text
Class InlineFlowLayout

java.lang.Object
  extended by

org.eclipse.draw2d.text.FlowFigureLayout
      extended by

org.eclipse.draw2d.text.FlowContainerLayout
          extended by
org.eclipse.draw2d.text.InlineFlowLayout
All Implemented Interfaces:
FlowContext, LayoutManager

public class InlineFlowLayout
extends FlowContainerLayout

The layout manager for InlineFlow figures.

WARNING: This class is not intended to be subclassed by clients.

Since:
2.1

Constructor Summary
InlineFlowLayout ( FlowFigure flow)
          Creates a new InlineFlowLayout with the given FlowFigure.
 
Method Summary
 void addLine ( CompositeBox box)
          Adds the given box as a line below the current line.
protected  void createNewLine ()
          Used by getCurrentLine().
 void endLine ()
          The current line should be committed if it is occupied, and then set to null.
protected  void flush ()
          Called after FlowContainerLayout.layoutChildren() when all children have been laid out.
 boolean getContinueOnSameLine ()
          InlineFlowLayout gets this information from its context.
 void getWidthLookahead ( FlowFigure child, int[] result)
          This method looks ahead for line-breaks.
 boolean isCurrentLineOccupied ()
           
 void preLayout ()
          Clears out all fragments prior to the call to layoutChildren().
 void setContinueOnSameLine (boolean value)
          InlineFlow passes this information to its context.
protected  void setupLine ( LineBox line)
          Initializes the given LineBox.
 
Methods inherited from class org.eclipse.draw2d.text. FlowContainerLayout
addToCurrentLine, cleanup, getRemainingLineWidth, layout, layoutChildren
 
Methods inherited from class org.eclipse.draw2d.text. FlowFigureLayout
getConstraint, getContext, getFlowFigure, getMinimumSize, getPreferredSize, invalidate, layout, remove, setConstraint, setFlowContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InlineFlowLayout

public InlineFlowLayout(
FlowFigure flow)
Creates a new InlineFlowLayout with the given FlowFigure.

Parameters:
flow - The FlowFigure
Method Detail

addLine

public void addLine(
CompositeBox box)
Adds the given box as a line below the current line.

Parameters:
box - the box to add

createNewLine

protected void createNewLine()
Description copied from class: FlowContainerLayout
Used by getCurrentLine().

Specified by:
createNewLine in class FlowContainerLayout
See Also:
FlowContainerLayout.createNewLine()

endLine

public void endLine()
Description copied from interface: FlowContext
The current line should be committed if it is occupied, and then set to null. Otherwise, do nothing.

See Also:
FlowContext.endLine()

flush

protected void flush()
Description copied from class: FlowContainerLayout
Called after FlowContainerLayout.layoutChildren() when all children have been laid out. This method exists to flush the last line.

Specified by:
flush in class FlowContainerLayout
See Also:
FlowContainerLayout.flush()

getContinueOnSameLine

public boolean getContinueOnSameLine()
InlineFlowLayout gets this information from its context.

Returns:
true if the next fragment should be placed on the current line
See Also:
FlowContext.getContinueOnSameLine()

getWidthLookahead

public void getWidthLookahead(
FlowFigure child,
                              int[] result)
Description copied from interface: FlowContext
This method looks ahead for line-breaks. When laying out, this method can be used to determine the next line-break across multiple figures.

Parameters:
child - the search will occur starting from the figure after the given child
result - the width before the next line-break (if one's found; all the width, otherwise) will be added on to the first int in the given array
See Also:
FlowContext.getWidthLookahead(FlowFigure, int[])

isCurrentLineOccupied

public boolean isCurrentLineOccupied()
Specified by:
isCurrentLineOccupied in interface FlowContext
Overrides:
isCurrentLineOccupied in class FlowContainerLayout
See Also:
FlowContainerLayout.isCurrentLineOccupied()

preLayout

public void preLayout()
Clears out all fragments prior to the call to layoutChildren().

Specified by:
preLayout in class FlowContainerLayout

setContinueOnSameLine

public void setContinueOnSameLine(boolean value)
InlineFlow passes this information to its context.

Parameters:
value - true indicates that the first fragment of the next TextFlow should be laid out on the current line, and not a new one
See Also:
FlowContext.setContinueOnSameLine(boolean)

setupLine

protected void setupLine(
LineBox line)
Initializes the given LineBox. Called by createNewLine().

Parameters:
line - The LineBox to initialize.

Eclipse Draw2d
3.3

Copyright (c) IBM Corp. and others 2000, 2007. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire