Tabnine Logo
CTPresetLineDashProperties.setVal
Code IndexAdd Tabnine to your IDE (free)

How to use
setVal
method
in
org.openxmlformats.schemas.drawingml.x2006.main.CTPresetLineDashProperties

Best Java code snippets using org.openxmlformats.schemas.drawingml.x2006.main.CTPresetLineDashProperties.setVal (Showing top 13 results out of 315)

origin: org.apache.poi/poi-ooxml

  public void setValue(PresetLineDash dash) {
    if (dash == null) {
      if (props.isSetVal()) {
        props.unsetVal();
      }
    } else {
      props.setVal(dash.underlying);
    }
  }
}
origin: org.apache.poi/poi-ooxml

@Override
public void setBorderDash(BorderEdge edge, LineDash dash) {
  if (dash == null) {
    throw new IllegalArgumentException("LineDash need to be specified.");
  }
  CTLineProperties ln = setBorderDefaults(edge);
  if (!ln.isSetPrstDash()) {
    ln.addNewPrstDash();
  }
  ln.getPrstDash().setVal(STPresetLineDashVal.Enum.forInt(dash.ooxmlId));
}
origin: org.apache.poi/poi-ooxml

/**
 * Sets the line style.
 *
 * @param lineStyle
 */
public void setLineStyle( int lineStyle ) {
  CTShapeProperties props = getShapeProperties();
  CTLineProperties ln = props.isSetLn() ? props.getLn() : props.addNewLn();
  CTPresetLineDashProperties dashStyle = CTPresetLineDashProperties.Factory.newInstance();
  dashStyle.setVal(STPresetLineDashVal.Enum.forInt(lineStyle+1));
  ln.setPrstDash(dashStyle);
}
origin: org.apache.poi/poi-ooxml

/**
 *
 * @param dash a preset line dashing scheme to stroke thr shape outline
 */
@SuppressWarnings("WeakerAccess")
public void setLineDash(LineDash dash) {
  CTLineProperties ln = getLn(this, true);
  if (ln == null) {
    return;
  }
  if (dash == null) {
    if (ln.isSetPrstDash()) {
      ln.unsetPrstDash();
    }
  } else {
    CTPresetLineDashProperties ldp = ln.isSetPrstDash() ? ln.getPrstDash() : ln.addNewPrstDash();
    ldp.setVal(STPresetLineDashVal.Enum.forInt(dash.ooxmlId));
  }
}
origin: org.apache.poi/poi-ooxml

ln.addNewPrstDash().setVal(STPresetLineDashVal.SOLID);
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

  public void setValue(PresetLineDash dash) {
    if (dash == null) {
      if (props.isSetVal()) {
        props.unsetVal();
      }
    } else {
      props.setVal(dash.underlying);
    }
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

@Override
public void setBorderDash(BorderEdge edge, LineDash dash) {
  if (dash == null) {
    throw new IllegalArgumentException("LineDash need to be specified.");
  }
  CTLineProperties ln = setBorderDefaults(edge);
  if (!ln.isSetPrstDash()) {
    ln.addNewPrstDash();
  }
  ln.getPrstDash().setVal(STPresetLineDashVal.Enum.forInt(dash.ooxmlId));
}
origin: org.openl.rules/org.openl.lib.poi.dev

/**
 * Sets the line style.
 *
 * @param lineStyle
 */
public void setLineStyle( int lineStyle ) {
  CTShapeProperties props = getShapeProperties();
  CTLineProperties ln = props.isSetLn() ? props.getLn() : props.addNewLn();
  CTPresetLineDashProperties dashStyle = CTPresetLineDashProperties.Factory.newInstance();
  dashStyle.setVal(STPresetLineDashVal.Enum.forInt(lineStyle+1));
  ln.setPrstDash(dashStyle);
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

/**
 * Sets the line style.
 *
 * @param lineStyle
 */
public void setLineStyle( int lineStyle ) {
  CTShapeProperties props = getShapeProperties();
  CTLineProperties ln = props.isSetLn() ? props.getLn() : props.addNewLn();
  CTPresetLineDashProperties dashStyle = CTPresetLineDashProperties.Factory.newInstance();
  dashStyle.setVal(STPresetLineDashVal.Enum.forInt(lineStyle+1));
  ln.setPrstDash(dashStyle);
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

/**
 *
 * @param dash a preset line dashing scheme to stroke thr shape outline
 */
@SuppressWarnings("WeakerAccess")
public void setLineDash(LineDash dash) {
  CTLineProperties ln = getLn(this, true);
  if (ln == null) {
    return;
  }
  if (dash == null) {
    if (ln.isSetPrstDash()) {
      ln.unsetPrstDash();
    }
  } else {
    CTPresetLineDashProperties ldp = ln.isSetPrstDash() ? ln.getPrstDash() : ln.addNewPrstDash();
    ldp.setVal(STPresetLineDashVal.Enum.forInt(dash.ooxmlId));
  }
}
origin: org.openl.rules/org.openl.lib.poi.dev

/**
 *
 * @param dash a preset line dashing scheme to stroke thr shape outline
 */
public void setLineDash(LineDash dash) {
  CTShapeProperties spPr = getSpPr();
  if (dash == null) {
    if (spPr.isSetLn())
      spPr.getLn().unsetPrstDash();
  } else {
    CTPresetLineDashProperties val = CTPresetLineDashProperties.Factory
        .newInstance();
    val.setVal(STPresetLineDashVal.Enum.forInt(dash.ordinal() + 1));
    CTLineProperties ln = spPr.isSetLn() ? spPr.getLn() : spPr
        .addNewLn();
    ln.setPrstDash(val);
  }
}
origin: org.openl.rules/org.openl.lib.poi.dev

private void setLineColor(CTLineProperties ln, Color color){
  if(color == null){
    ln.addNewNoFill();
    if(ln.isSetSolidFill()) ln.unsetSolidFill();
  } else {
    if(ln.isSetNoFill()) ln.unsetNoFill();
    if(!ln.isSetPrstDash()) ln.addNewPrstDash().setVal(STPresetLineDashVal.SOLID);
    ln.setCmpd(STCompoundLine.SNG);
    ln.setAlgn(STPenAlignment.CTR);
    ln.setCap(STLineCap.FLAT);
    ln.addNewRound();
    CTLineEndProperties hd = ln.addNewHeadEnd();
    hd.setType(STLineEndType.NONE);
    hd.setW(STLineEndWidth.MED);
    hd.setLen(STLineEndLength.MED);
    CTLineEndProperties tl = ln.addNewTailEnd();
    tl.setType(STLineEndType.NONE);
    tl.setW(STLineEndWidth.MED);
    tl.setLen(STLineEndLength.MED);
    CTSRgbColor rgb = CTSRgbColor.Factory.newInstance();
    rgb.setVal(new byte[]{(byte)color.getRed(), (byte)color.getGreen(), (byte)color.getBlue()});
    ln.addNewSolidFill().setSrgbClr(rgb);
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

ln.addNewPrstDash().setVal(STPresetLineDashVal.SOLID);
org.openxmlformats.schemas.drawingml.x2006.mainCTPresetLineDashPropertiessetVal

Popular methods of CTPresetLineDashProperties

  • getVal
  • isSetVal
  • unsetVal

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (Timer)
  • setScale (BigDecimal)
  • findViewById (Activity)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now