Tabnine Logo
CTSolidColorFillProperties.setSrgbClr
Code IndexAdd Tabnine to your IDE (free)

How to use
setSrgbClr
method
in
org.openxmlformats.schemas.drawingml.x2006.main.CTSolidColorFillProperties

Best Java code snippets using org.openxmlformats.schemas.drawingml.x2006.main.CTSolidColorFillProperties.setSrgbClr (Showing top 12 results out of 315)

origin: org.apache.poi/poi-ooxml

@Override
public void setFillColor(int red, int green, int blue) {
  CTShapeProperties props = getShapeProperties();
  CTSolidColorFillProperties fill = props.isSetSolidFill() ? props.getSolidFill() : props.addNewSolidFill();
  CTSRgbColor rgb = CTSRgbColor.Factory.newInstance();
  rgb.setVal(new byte[]{(byte)red, (byte)green, (byte)blue});
  fill.setSrgbClr(rgb);
}
origin: org.apache.poi/poi-ooxml

@Override
public void setLineStyleColor( int red, int green, int blue ) {
  CTShapeProperties props = getShapeProperties();
  CTLineProperties ln = props.isSetLn() ? props.getLn() : props.addNewLn();
  CTSolidColorFillProperties fill = ln.isSetSolidFill() ? ln.getSolidFill() : ln.addNewSolidFill();
  CTSRgbColor rgb = CTSRgbColor.Factory.newInstance();
  rgb.setVal(new byte[]{(byte)red, (byte)green, (byte)blue});
  fill.setSrgbClr(rgb);
}
origin: org.apache.poi/poi-ooxml

  props.setScrgbClr((CTScRgbColor) color.getXmlObject());
} else if (color instanceof XDDFColorRgbBinary) {
  props.setSrgbClr((CTSRgbColor) color.getXmlObject());
} else if (color instanceof XDDFColorSystemDefined) {
  props.setSysClr((CTSystemColor) color.getXmlObject());
origin: org.openl.rules/org.openl.lib.poi.dev

/**
 * Specifies a solid color fill. The shape is filled entirely with the specified color.
 *
 * @param color the solid color fill.
 * The value of <code>null</code> unsets the solidFIll attribute from the underlying xml
 */
@Override
public void setFillColor(Color color) {
  CTTableCellProperties spPr = getXmlObject().getTcPr();
  if (color == null) {
    if(spPr.isSetSolidFill()) spPr.unsetSolidFill();
  }
  else {
    CTSolidColorFillProperties fill = spPr.isSetSolidFill() ? spPr.getSolidFill() : spPr.addNewSolidFill();
    CTSRgbColor rgb = CTSRgbColor.Factory.newInstance();
    rgb.setVal(new byte[]{(byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue()});
    fill.setSrgbClr(rgb);
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

@Override
public void setFillColor(int red, int green, int blue) {
  CTShapeProperties props = getShapeProperties();
  CTSolidColorFillProperties fill = props.isSetSolidFill() ? props.getSolidFill() : props.addNewSolidFill();
  CTSRgbColor rgb = CTSRgbColor.Factory.newInstance();
  rgb.setVal(new byte[]{(byte)red, (byte)green, (byte)blue});
  fill.setSrgbClr(rgb);
}
origin: org.openl.rules/org.openl.lib.poi.dev

/**
 * Sets the color used to fill this shape using the solid fill pattern.
 */
public void setFillColor(int red, int green, int blue) {
  CTShapeProperties props = getShapeProperties();
  CTSolidColorFillProperties fill = props.isSetSolidFill() ? props.getSolidFill() : props.addNewSolidFill();
  CTSRgbColor rgb = CTSRgbColor.Factory.newInstance();
  rgb.setVal(new byte[]{(byte)red, (byte)green, (byte)blue});
  fill.setSrgbClr(rgb);
}
origin: org.openl.rules/org.openl.lib.poi.dev

/**
 * The color applied to the lines of this shape.
 */
public void setLineStyleColor( int red, int green, int blue ) {
  CTShapeProperties props = getShapeProperties();
  CTLineProperties ln = props.isSetLn() ? props.getLn() : props.addNewLn();
  CTSolidColorFillProperties fill = ln.isSetSolidFill() ? ln.getSolidFill() : ln.addNewSolidFill();
  CTSRgbColor rgb = CTSRgbColor.Factory.newInstance();
  rgb.setVal(new byte[]{(byte)red, (byte)green, (byte)blue});
  fill.setSrgbClr(rgb);
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

@Override
public void setLineStyleColor( int red, int green, int blue ) {
  CTShapeProperties props = getShapeProperties();
  CTLineProperties ln = props.isSetLn() ? props.getLn() : props.addNewLn();
  CTSolidColorFillProperties fill = ln.isSetSolidFill() ? ln.getSolidFill() : ln.addNewSolidFill();
  CTSRgbColor rgb = CTSRgbColor.Factory.newInstance();
  rgb.setVal(new byte[]{(byte)red, (byte)green, (byte)blue});
  fill.setSrgbClr(rgb);
}
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.openl.rules/org.openl.lib.poi.dev

/**
 * Specifies a solid color fill. The shape is filled entirely with the
 * specified color.
 *
 * @param color the solid color fill. The value of <code>null</code> unsets
 *              the solidFIll attribute from the underlying xml
 */
public void setFillColor(Color color) {
  CTShapeProperties spPr = getSpPr();
  if (color == null) {
    if (spPr.isSetSolidFill()) spPr.unsetSolidFill();
    if (!spPr.isSetNoFill()) spPr.addNewNoFill();
  } else {
    if (spPr.isSetNoFill()) spPr.unsetNoFill();
    CTSolidColorFillProperties fill = spPr.isSetSolidFill() ? spPr
        .getSolidFill() : spPr.addNewSolidFill();
    CTSRgbColor rgb = CTSRgbColor.Factory.newInstance();
    rgb.setVal(new byte[]{(byte) color.getRed(),
        (byte) color.getGreen(), (byte) color.getBlue()});
    fill.setSrgbClr(rgb);
    if(fill.isSetHslClr()) fill.unsetHslClr();
    if(fill.isSetPrstClr()) fill.unsetPrstClr();
    if(fill.isSetSchemeClr()) fill.unsetSchemeClr();
    if(fill.isSetScrgbClr()) fill.unsetScrgbClr();
    if(fill.isSetSysClr()) fill.unsetSysClr();
  }
}
origin: org.openl.rules/org.openl.lib.poi.dev

/**
* @param color  the color to paint the shape outline.
 * A <code>null</code> value turns off the shape outline.
 */
public void setLineColor(Color color) {
  CTShapeProperties spPr = getSpPr();
  if (color == null) {
    if (spPr.isSetLn() && spPr.getLn().isSetSolidFill())
      spPr.getLn().unsetSolidFill();
  } else {
    CTLineProperties ln = spPr.isSetLn() ? spPr.getLn() : spPr
        .addNewLn();
    CTSRgbColor rgb = CTSRgbColor.Factory.newInstance();
    rgb.setVal(new byte[]{(byte) color.getRed(),
        (byte) color.getGreen(), (byte) color.getBlue()});
    CTSolidColorFillProperties fill = ln.isSetSolidFill() ? ln
        .getSolidFill() : ln.addNewSolidFill();
    fill.setSrgbClr(rgb);
    if(fill.isSetHslClr()) fill.unsetHslClr();
    if(fill.isSetPrstClr()) fill.unsetPrstClr();
    if(fill.isSetSchemeClr()) fill.unsetSchemeClr();
    if(fill.isSetScrgbClr()) fill.unsetScrgbClr();
    if(fill.isSetSysClr()) fill.unsetSysClr();
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

  props.setScrgbClr((CTScRgbColor) color.getXmlObject());
} else if (color instanceof XDDFColorRgbBinary) {
  props.setSrgbClr((CTSRgbColor) color.getXmlObject());
} else if (color instanceof XDDFColorSystemDefined) {
  props.setSysClr((CTSystemColor) color.getXmlObject());
org.openxmlformats.schemas.drawingml.x2006.mainCTSolidColorFillPropertiessetSrgbClr

Popular methods of CTSolidColorFillProperties

  • addNewSrgbClr
  • getSchemeClr
  • getSrgbClr
  • isSetHslClr
  • isSetPrstClr
  • isSetSchemeClr
  • isSetScrgbClr
  • isSetSrgbClr
  • isSetSysClr
  • unsetHslClr
  • unsetPrstClr
  • unsetSchemeClr
  • unsetPrstClr,
  • unsetSchemeClr,
  • unsetScrgbClr,
  • unsetSysClr,
  • addNewScrgbClr,
  • getHslClr,
  • getPrstClr,
  • getScrgbClr,
  • getSysClr

Popular in Java

  • Reading from database using SQL prepared statement
  • compareTo (BigDecimal)
  • setContentView (Activity)
  • findViewById (Activity)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • CodeWhisperer alternatives
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