Codota Logo
AT_Cell
Code IndexAdd Codota to your IDE (free)

How to use
AT_Cell
in
de.vandermeer.asciitable

Best Java code snippets using de.vandermeer.asciitable.AT_Cell (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: zalando/zalenium

headerRow.getCells().get(6).getContext().setTextAlignment(TextAlignment.RIGHT);
headerRow.getCells().get(7).getContext().setTextAlignment(TextAlignment.RIGHT);
headerRow.getCells().get(8).getContext().setTextAlignment(TextAlignment.RIGHT);
headerRow.getCells().get(9).getContext().setTextAlignment(TextAlignment.RIGHT);
  row.getCells().get(6).getContext().setTextAlignment(TextAlignment.RIGHT);
  row.getCells().get(7).getContext().setTextAlignment(TextAlignment.RIGHT);
  row.getCells().get(8).getContext().setTextAlignment(TextAlignment.RIGHT);
  row.getCells().get(9).getContext().setTextAlignment(TextAlignment.RIGHT);
});
origin: de.vandermeer/asciitable

if(cells.get(i).getContent()!=null){
  String[] lines = String_To_ConditionalBreak.convert(Object_To_StrBuilder.convert(cells.get(i).getContent()).toString());
    int lineWidth = line.length() + cells.get(i).getContext().getPaddingLeft() + cells.get(i).getContext().getPaddingRight();
    if(lineWidth > resultWidths[i]) {
      int maxWidth = (maxWidths.length>i)?maxWidths[i]:0;
origin: vdmeer/asciitable

/**
 * Creates a new row with content with given cell context and a normal row style.
 * @param content the content for the row, each member of the array represents the content for a cell in the row, must not be null but can contain null members
 * @return a new row with content
 * @throws {@link NullPointerException} if content was null
 */
public static AT_Row createContentRow(Object[] content, TableRowStyle style){
  Validate.notNull(content);
  Validate.notNull(style);
  Validate.validState(style!=TableRowStyle.UNKNOWN);
  LinkedList<AT_Cell> cells = new LinkedList<AT_Cell>();
  for(Object o : content){
    cells.add(new AT_Cell(o));
  }
  return new AT_Row(){
    @Override
    public TableRowType getType(){
      return TableRowType.CONTENT;
    }
    @Override
    public TableRowStyle getStyle(){
      return style;
    }
    @Override
    public LinkedList<AT_Cell> getCells(){
      return cells;
    }
  };
}
origin: vdmeer/asciitable

if(cells.get(i).getContent()!=null){
  String[] lines = String_To_ConditionalBreak.convert(Object_To_StrBuilder.convert(cells.get(i).getContent()).toString());
    int lineWidth = line.length() + cells.get(i).getContext().getPaddingLeft() + cells.get(i).getContext().getPaddingRight();
    if(lineWidth > resultWidths[i]) {
      int maxWidth = (maxWidths.length>i)?maxWidths[i]:0;
origin: de.vandermeer/asciitable

/**
 * Creates a new row with content with given cell context and a normal row style.
 * @param content the content for the row, each member of the array represents the content for a cell in the row, must not be null but can contain null members
 * @return a new row with content
 * @throws {@link NullPointerException} if content was null
 */
public static AT_Row createContentRow(Object[] content, TableRowStyle style){
  Validate.notNull(content);
  Validate.notNull(style);
  Validate.validState(style!=TableRowStyle.UNKNOWN);
  LinkedList<AT_Cell> cells = new LinkedList<AT_Cell>();
  for(Object o : content){
    cells.add(new AT_Cell(o));
  }
  return new AT_Row(){
    @Override
    public TableRowType getType(){
      return TableRowType.CONTENT;
    }
    @Override
    public TableRowStyle getStyle(){
      return style;
    }
    @Override
    public LinkedList<AT_Cell> getCells(){
      return cells;
    }
  };
}
origin: vdmeer/asciitable

/**
 * Sets all padding for all cells in the row to the same value.
 * @param padding new padding for top, bottom, left, and right, ignored if smaller than 0
 * @return this to allow chaining
 */
public AT_Row setPadding(int padding){
  if(this.hasCells()){
    for(AT_Cell cell : this.getCells()){
      cell.getContext().setPadding(padding);
    }
  }
  return this;
}
origin: de.vandermeer/asciitable

if(cells.get(i).getContent()!=null){
  String[] ar = StringUtils.split(Object_To_StrBuilder.convert(cells.get(i).getContent()).toString());
  for(int k=0; k<ar.length; k++){
    int count = ar[k].length() + cells.get(i).getContext().getPaddingLeft() + cells.get(i).getContext().getPaddingRight();
    if(count>ret[i]){
      ret[i] = count;
origin: vdmeer/asciitable

/**
 * Sets the bottom padding character for all cells in the row.
 * @param paddingBottomChar new padding character, ignored if null
 * @return this to allow chaining
 */
public AT_Row setPaddingBottomChar(Character paddingBottomChar) {
  if(this.hasCells()){
    for(AT_Cell cell : this.getCells()){
      cell.getContext().setPaddingBottomChar(paddingBottomChar);
    }
  }
  return this;
}
origin: vdmeer/asciitable

if(cells.get(i).getContent()!=null){
  String[] ar = StringUtils.split(Object_To_StrBuilder.convert(cells.get(i).getContent()).toString());
  for(int k=0; k<ar.length; k++){
    int count = ar[k].length() + cells.get(i).getContext().getPaddingLeft() + cells.get(i).getContext().getPaddingRight();
    if(count>ret[i]){
      ret[i] = count;
origin: cmeza20/spring-data-generator

public static void addRowGeneratedTable(Object... columns) {
  if (generatedTable == null) {
    initializeTable();
  }
  generatedTable.addRule();
  AT_Row row = generatedTable.addRow(columns);
  if (columns[0] != null) {
    row.getCells().get(0).getContext().setTextAlignment(TextAlignment.CENTER);
  }
  if (columns[2] != null) {
    row.getCells().get(2).getContext().setTextAlignment(TextAlignment.CENTER);
  }
}
origin: de.vandermeer/asciitable

Object content = cells.get(i).getContent();
if(content==null){
  length++;
length -= cells.get(i).getContext().getPaddingLeft();
length -= cells.get(i).getContext().getPaddingRight();
  if(cells.get(i).getContext().getTargetTranslator()!=null){
    if(cells.get(i).getContext().getTargetTranslator().getCombinedTranslator()!=null){
      text = cells.get(i).getContext().getTargetTranslator().getCombinedTranslator().translate(text);
  else if(cells.get(i).getContext().getHtmlElementTranslator()!=null){
    text = cells.get(i).getContext().getHtmlElementTranslator().translateHtmlElements(text);
  else if(cells.get(i).getContext().getCharTranslator()!=null){
    text = cells.get(i).getContext().getCharTranslator().translateCharacters(text);
      cells.get(i).getContext().getTextAlignment().getMapping(),
      TextFormat.NONE.getMapping(),
      null, null, null, 0, 0, null, 0, 0, null)
    sb.insert(0, new StrBuilder().appendPadding(cells.get(i).getContext().getPaddingLeft(), cells.get(i).getContext().getPaddingLeftChar()));
    sb.appendPadding(cells.get(i).getContext().getPaddingRight(), cells.get(i).getContext().getPaddingRightChar());
  for(int k=0; k<cells.get(i).getContext().getPaddingTop(); k++){
    ((ArrayList<StrBuilder>)csb).add(0, new StrBuilder().appendPadding(realWidth, cells.get(i).getContext().getPaddingTopChar()));
  for(int k=0; k<cells.get(i).getContext().getPaddingBottom(); k++){
    ((ArrayList<StrBuilder>)csb).add(new StrBuilder().appendPadding(realWidth, cells.get(i).getContext().getPaddingBottomChar()));
origin: de.vandermeer/asciitable

/**
 * Sets the right padding for all cells in the row.
 * @param paddingRight new padding, ignored if smaller than 0
 * @return this to allow chaining
 */
public AT_Row setPaddingRight(int paddingRight) {
  if(this.hasCells()){
    for(AT_Cell cell : this.getCells()){
      cell.getContext().setPaddingRight(paddingRight);
    }
  }
  return this;
}
origin: vdmeer/asciitable

Object content = cells.get(i).getContent();
if(content==null){
  length++;
length -= cells.get(i).getContext().getPaddingLeft();
length -= cells.get(i).getContext().getPaddingRight();
  if(cells.get(i).getContext().getTargetTranslator()!=null){
    if(cells.get(i).getContext().getTargetTranslator().getCombinedTranslator()!=null){
      text = cells.get(i).getContext().getTargetTranslator().getCombinedTranslator().translate(text);
  else if(cells.get(i).getContext().getHtmlElementTranslator()!=null){
    text = cells.get(i).getContext().getHtmlElementTranslator().translateHtmlElements(text);
  else if(cells.get(i).getContext().getCharTranslator()!=null){
    text = cells.get(i).getContext().getCharTranslator().translateCharacters(text);
      cells.get(i).getContext().getTextAlignment().getMapping(),
      TextFormat.NONE.getMapping(),
      null, null, null, 0, 0, null, 0, 0, null)
    sb.insert(0, new StrBuilder().appendPadding(cells.get(i).getContext().getPaddingLeft(), cells.get(i).getContext().getPaddingLeftChar()));
    sb.appendPadding(cells.get(i).getContext().getPaddingRight(), cells.get(i).getContext().getPaddingRightChar());
  for(int k=0; k<cells.get(i).getContext().getPaddingTop(); k++){
    ((ArrayList<StrBuilder>)csb).add(0, new StrBuilder().appendPadding(realWidth, cells.get(i).getContext().getPaddingTopChar()));
  for(int k=0; k<cells.get(i).getContext().getPaddingBottom(); k++){
    ((ArrayList<StrBuilder>)csb).add(new StrBuilder().appendPadding(realWidth, cells.get(i).getContext().getPaddingBottomChar()));
origin: de.vandermeer/asciitable

/**
 * Sets the right padding character for all cells in the row.
 * @param paddingRightChar new padding character, ignored if null
 * @return this to allow chaining
 */
public AT_Row setPaddingRightChar(Character paddingRightChar) {
  if(this.hasCells()){
    for(AT_Cell cell : this.getCells()){
      cell.getContext().setPaddingRightChar(paddingRightChar);
    }
  }
  return this;
}
origin: vdmeer/asciitable

/**
 * Sets the left padding for all cells in the row.
 * @param paddingLeft new padding, ignored if smaller than 0
 * @return this to allow chaining
 */
public AT_Row setPaddingLeft(int paddingLeft) {
  if(this.hasCells()){
    for(AT_Cell cell : this.getCells()){
      cell.getContext().setPaddingLeft(paddingLeft);
    }
  }
  return this;
}
origin: vdmeer/asciitable

/**
 * Sets left and right padding for all cells in the row.
 * @param padding new padding for left and right, ignored if smaller than 0
 * @return this to allow chaining
 */
public AT_Row setPaddingLeftRight(int padding){
  if(this.hasCells()){
    for(AT_Cell cell : this.getCells()){
      cell.getContext().setPaddingLeftRight(padding);
    }
  }
  return this;
}
origin: vdmeer/asciitable

/**
 * Sets the top padding for all cells in the row.
 * @param paddingTop new padding, ignored if smaller than 0
 * @return this to allow chaining
 */
public AT_Row setPaddingTop(int paddingTop) {
  if(this.hasCells()){
    for(AT_Cell cell : this.getCells()){
      cell.getContext().setPaddingTop(paddingTop);
    }
  }
  return this;
}
origin: vdmeer/asciitable

/**
 * Sets top and bottom padding for all cells in the row.
 * @param padding new padding for top and bottom, ignored if smaller than 0
 * @return this to allow chaining
 */
public AT_Row setPaddingTopBottom(int padding){
  if(this.hasCells()){
    for(AT_Cell cell : this.getCells()){
      cell.getContext().setPaddingTopBottom(padding);
    }
  }
  return this;
}
origin: vdmeer/asciitable

/**
 * Sets the HTML entity translator for all cells in the row.
 * It will also remove any other translator set.
 * Nothing will happen if the argument is null.
 * @param htmlElementTranslator translator
 * @return this to allow chaining
 */
public AT_Row setHtmlElementTranslator(HtmlElementTranslator htmlElementTranslator) {
  if(this.hasCells()){
    for(AT_Cell cell : this.getCells()){
      cell.getContext().setHtmlElementTranslator(htmlElementTranslator);
    }
  }
  return this;
}
origin: vdmeer/asciitable

/**
 * Sets left and right padding for all cells in the row (only if both values are not smaller than 0).
 * @param paddingLeft new left padding, ignored if smaller than 0
 * @param paddingRight new right padding, ignored if smaller than 0
 * @return this to allow chaining
 */
public AT_Row setPaddingLeftRight(int paddingLeft, int paddingRight){
  if(this.hasCells()){
    for(AT_Cell cell : this.getCells()){
      cell.getContext().setPaddingLeftRight(paddingLeft, paddingRight);
    }
  }
  return this;
}
de.vandermeer.asciitableAT_Cell

Javadoc

Cell of an AT_RuleRow.

Most used methods

  • getContext
  • <init>
    Creates a new cell with content and context
  • getContent

Popular in Java

  • Creating JSON documents from java classes using gson
  • getResourceAsStream (ClassLoader)
  • getExternalFilesDir (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • JFileChooser (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.This exception may include information for locating the er
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now