Package com.independentsoft.office.odf.drawing

# Class Connector

java.lang.Object
com.independentsoft.office.odf.drawing.Shape
com.independentsoft.office.odf.drawing.Connector

All Implemented Interfaces:
  `ICellContent`, `IContentElement`, `IIndexContent`, `IParagraphContent`, `ITextContent`

public class Connector extends Shape
The Class Connector.

- ## Field Summary

  ### Fields inherited from class com.independentsoft.office.odf.drawing.Shape

  `height, id, layer, name, parent, style, textStyle, transform, width, x, y, zIndex`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Connector()`
  Initializes a new instance of the Connector class.
  `Connector​(InternalXMLStreamReader reader)`
  Instantiates a new connector.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `add​(IDrawText drawText)`
  Adds a IDrawText object to the content.
  `void`
  `add​(List list)`
  Adds a List object to the content.
  `void`
  `add​(Paragraph paragraph)`
  Adds a Paragraph object to the content.
  `Connector`
  `clone()`
  Creates a new object that is a deep copy of the current instance.
  `List<IDrawText>`
  `getContent()`
  Contains a collection of IDrawText objects.
  `List<IContentElement>`
  `getContentElements()`
  Returns all content elements.
  `int`
  `getEndGluePoint()`
  Gets the glue point in a shape where a connector ends by its number.
  `String`
  `getEndShape()`
  Gets the drawing shape to which the end of a connector is connected by its ID.
  `List<IEventListener>`
  `getEventListeners()`
  Contains an attachment of an event listener to a drawing shape.
  `List<GluePoint>`
  `getGluePoints()`
  Contains the designated point in the area of a drawing object to which a connector shape can connect.
  `Size`
  `getLineSkew()`
  Gets the generation of the lines that connect the start and end points.
  `IContentElement`
  `getParent()`
  Returns the parent content element.
  `int`
  `getStartGluePoint()`
  Gets the glue point in a shape where a connector starts by its number.
  `String`
  `getStartShape()`
  Gets the drawing shape to which the start of a connector is connected by its ID.
  `ConnectorType`
  `getType()`
  Gets the connecting line between two escape points.
  `String`
  `getX1()`
  Gets the start position of the glue point to which the connector is connected.
  `String`
  `getX2()`
  Gets the end position of the glue point to which the connector is connected.
  `String`
  `getY1()`
  Gets the start position of the glue point to which the connector is connected.
  `String`
  `getY2()`
  Gets the end position of the glue point to which the connector is connected.
  `void`
  `setEndGluePoint​(int endGluePoint)`
  Sets the glue point in a shape where a connector ends by its number.
  `void`
  `setEndShape​(String endShape)`
  Sets the drawing shape to which the end of a connector is connected by its ID.
  `void`
  `setLineSkew​(Size lineSkew)`
  Sets the generation of the lines that connect the start and end points.
  `void`
  `setParent​(IContentElement parent)`
  Sets the parent content element.
  `void`
  `setStartGluePoint​(int startGluePoint)`
  Sets the glue point in a shape where a connector starts by its number.
  `void`
  `setStartShape​(String startShape)`
  Sets the drawing shape to which the start of a connector is connected by its ID.
  `void`
  `setType​(ConnectorType type)`
  Sets the connecting line between two escape points.
  `void`
  `setX1​(String x1)`
  Sets the start position of the glue point to which the connector is connected.
  `void`
  `setX2​(String x2)`
  Sets the end position of the glue point to which the connector is connected.
  `void`
  `setY1​(String y1)`
  Sets the start position of the glue point to which the connector is connected.
  `void`
  `setY2​(String y2)`
  Sets the end position of the glue point to which the connector is connected.
  `String`
  `toString()`
  Converts the value of the current Connector object to its equivalent string representation.

  ### Methods inherited from class com.independentsoft.office.odf.drawing.Shape

  `getHeight, getID, getLayer, getName, getStyle, getTextStyle, getTransform, getWidth, getX, getY, getZIndex, setHeight, setID, setLayer, setName, setStyle, setTextStyle, setTransform, setWidth, setX, setY, setZIndex`

  ### Methods inherited from class java.lang.Object

  `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### Connector

    public Connector()
    Initializes a new instance of the Connector class.

  - ### Connector

    public Connector​(InternalXMLStreamReader reader) throws XMLStreamException
    Instantiates a new connector.
    Parameters:
      `reader` - the reader
    Throws:
      `XMLStreamException` - the xML stream exception

- ## Method Details

  - ### add

    public void add​(List list)
    Adds a List object to the content.
    Parameters:
      `list` - the list

  - ### add

    public void add​(Paragraph paragraph)
    Adds a Paragraph object to the content.
    Parameters:
      `paragraph` - the paragraph

  - ### add

    public void add​(IDrawText drawText)
    Adds a IDrawText object to the content.
    Parameters:
      `drawText` - the draw text

  - ### getContentElements

    public List<IContentElement> getContentElements()
    Returns all content elements.
    Specified by:
      `getContentElements` in interface `IContentElement`
    Specified by:
      `getContentElements` in class `Shape`
    Returns:
      A collection of content elements.

  - ### getParent

    public IContentElement getParent()
    Returns the parent content element.
    Specified by:
      `getParent` in interface `IContentElement`
    Overrides:
      `getParent` in class `Shape`
    Returns:
      the parent

  - ### setParent

    public void setParent​(IContentElement parent)
    Sets the parent content element.
    Specified by:
      `setParent` in interface `IContentElement`
    Overrides:
      `setParent` in class `Shape`
    Parameters:
      `parent` - the new parent

  - ### clone

    public Connector clone()
    Creates a new object that is a deep copy of the current instance.
    Specified by:
      `clone` in interface `ICellContent`
    Specified by:
      `clone` in interface `IContentElement`
    Specified by:
      `clone` in interface `IIndexContent`
    Specified by:
      `clone` in interface `IParagraphContent`
    Specified by:
      `clone` in interface `ITextContent`
    Specified by:
      `clone` in class `Shape`
    Returns:
      A new object that is a copy of this instance.

  - ### toString

    public String toString()
    Converts the value of the current Connector object to its equivalent string representation.
    Overrides:
      `toString` in class `Object`
    Returns:
      the string

  - ### getContent

    public List<IDrawText> getContent()
    Contains a collection of IDrawText objects.
    Returns:
      the content

  - ### getEventListeners

    public List<IEventListener> getEventListeners()
    Contains an attachment of an event listener to a drawing shape.
    Returns:
      the event listeners

  - ### getGluePoints

    public List<GluePoint> getGluePoints()
    Contains the designated point in the area of a drawing object to which a connector shape can connect.
    Returns:
      the glue points

  - ### getType

    public ConnectorType getType()
    Gets the connecting line between two escape points.
    Returns:
      the type

  - ### setType

    public void setType​(ConnectorType type)
    Sets the connecting line between two escape points.
    Parameters:
      `type` - the new type

  - ### getX1

    public String getX1()
    Gets the start position of the glue point to which the connector is connected.
    Returns:
      the x1

  - ### setX1

    public void setX1​(String x1)
    Sets the start position of the glue point to which the connector is connected.
    Parameters:
      `x1` - the new x1

  - ### getY1

    public String getY1()
    Gets the start position of the glue point to which the connector is connected.
    Returns:
      the y1

  - ### setY1

    public void setY1​(String y1)
    Sets the start position of the glue point to which the connector is connected.
    Parameters:
      `y1` - the new y1

  - ### getX2

    public String getX2()
    Gets the end position of the glue point to which the connector is connected.
    Returns:
      the x2

  - ### setX2

    public void setX2​(String x2)
    Sets the end position of the glue point to which the connector is connected.
    Parameters:
      `x2` - the new x2

  - ### getY2

    public String getY2()
    Gets the end position of the glue point to which the connector is connected.
    Returns:
      the y2

  - ### setY2

    public void setY2​(String y2)
    Sets the end position of the glue point to which the connector is connected.
    Parameters:
      `y2` - the new y2

  - ### getStartShape

    public String getStartShape()
    Gets the drawing shape to which the start of a connector is connected by its ID.
    Returns:
      the start shape

  - ### setStartShape

    public void setStartShape​(String startShape)
    Sets the drawing shape to which the start of a connector is connected by its ID.
    Parameters:
      `startShape` - the new start shape

  - ### getEndShape

    public String getEndShape()
    Gets the drawing shape to which the end of a connector is connected by its ID.
    Returns:
      the end shape

  - ### setEndShape

    public void setEndShape​(String endShape)
    Sets the drawing shape to which the end of a connector is connected by its ID.
    Parameters:
      `endShape` - the new end shape

  - ### getStartGluePoint

    public int getStartGluePoint()
    Gets the glue point in a shape where a connector starts by its number.
    Returns:
      the start glue point

  - ### setStartGluePoint

    public void setStartGluePoint​(int startGluePoint)
    Sets the glue point in a shape where a connector starts by its number.
    Parameters:
      `startGluePoint` - the new start glue point

  - ### getEndGluePoint

    public int getEndGluePoint()
    Gets the glue point in a shape where a connector ends by its number.
    Returns:
      the end glue point

  - ### setEndGluePoint

    public void setEndGluePoint​(int endGluePoint)
    Sets the glue point in a shape where a connector ends by its number.
    Parameters:
      `endGluePoint` - the new end glue point

  - ### getLineSkew

    public Size getLineSkew()
    Gets the generation of the lines that connect the start and end points. Depending on the type of connector, this can vary from one to three distances that move the connector lines relative to their position.
    Returns:
      the line skew

  - ### setLineSkew

    public void setLineSkew​(Size lineSkew)
    Sets the generation of the lines that connect the start and end points. Depending on the type of connector, this can vary from one to three distances that move the connector lines relative to their position.
    Parameters:
      `lineSkew` - the new line skew