Tabnine Logo
RenderAppendable.append
Code IndexAdd Tabnine to your IDE (free)

How to use
append
method
in
org.crsh.text.RenderAppendable

Best Java code snippets using org.crsh.text.RenderAppendable.append (Showing top 20 results out of 315)

origin: crashub/crash

public void styleOff() {
 if (stack != null && stack.size() > 0) {
  append(Style.reset);
 }
}
origin: crashub/crash

public void enterStyle(Style.Composite style) {
 if (stack == null) {
  stack = new LinkedList<Style.Composite>();
 }
 append(style);
 stack.addLast(style);
}
origin: crashub/crash

 public void styleOn() {
  if (stack != null && stack.size() > 0) {
   append(getMerged());
  }
 }
}
origin: crashub/crash

public void provide(Object element) throws IOException {
 Renderer current = Renderer.getRenderable(element.getClass());
 if (current == null) {
  send();
  if (element instanceof CharSequence) {
   out.append((CharSequence)element);
  } else if (element instanceof CLS) {
   out.cls();
  } else if (element instanceof Style) {
   out.append((Style)element);
  } else {
   out.append(element.toString());
  }
 } else {
  if (renderable != null && !current.equals(renderable)) {
   send();
  }
  buffer.addLast(element);
  renderable = current;
 }
}
origin: crashub/crash

case 2: {
 to.styleOff();
 to.append(border.corner);
 for (int i = 0;i < widths.length;i++) {
  if (widths[i] > 0) {
   if (separator != null && i > 0) {
    to.append(border.horizontal);
    to.append(border.horizontal);
 to.append(border.corner);
 to.styleOn();
 for (int i = width - effectiveWidth.get();i > 0;i--) {
  to.append(' ');
 if (border != null) {
  to.styleOff();
  to.append(sep ? border.corner : border.vertical);
  to.styleOn();
    to.append(separator.vertical);
    to.append(' ');
  to.append(sep ? border.corner : border.vertical);
  to.styleOn();
  to.append(' ');
origin: crashub/crash

 previous = current;
to.append(' ');
to.append(' ');
origin: crashub/crash

if (first.hasLine()) {
 if (node) {
  to.append("+-");
  node = false;
 } else {
   to.append("| ");
  } else {
   to.append("  ");
origin: crashub/crash

 public void renderLine(RenderAppendable to) {
  if (index >= height) {
   throw new IllegalStateException();
  } else {
   Style.Composite style = element.getStyle();
   if (style != null) {
    to.enterStyle(style);
   }
   if (index < lines.length) {
    Pair<Integer, Integer> a = lines[index];
    to.append(element.value, a.getFirst(), a.getSecond());
    int missing = width - (a.getSecond() - a.getFirst());
    if (missing > 0) {
     to.append(BlankSequence.create(missing));
    }
   } else {
    for (int i = 0;i < width;i++) {
     to.append(' ');
    }
   }
   index++;
   if (style != null) {
    to.leaveStyle();
   }
  }
 }
}
origin: crashub/crash

if (separator != null) {
 to.styleOff();
 to.append(separator.vertical);
 to.styleOn();
  to.append(' ');
  to.append(' ');
readers[i] = null;
for (int j = widths[i];j > 0;j--) {
 to.append(' ');
origin: crashub/crash

/**
 * Renders this object to the provided output.
 *
 * @param out the output
 */
public final void render(RenderAppendable out) {
 LineReader renderer = reader(out.getWidth());
 if (renderer != null) {
  while (renderer.hasLine()) {
   renderer.renderLine(out);
   out.append('\n');
  }
 }
}
origin: crashub/crash

public void render(RenderAppendable to) {
 LineRenderer renderer = renderer();
 // For now height - 1 because of the char that goes to the line in some impl
 LineReader reader = renderer.reader(to.getWidth(), to.getHeight() - 1);
 if (reader != null) {
  while (reader.hasLine()) {
   reader.renderLine(to);
   to.append('\n');
  }
 }
}
origin: crashub/crash

for (int i = 0;i < widths.length;i++) {
 if (i > 0 && renderer.table.separator != null) {
  to.append(b.horizontal);
  to.append(b.horizontal);
origin: crashub/crash

public Style.Composite leaveStyle() {
 if (stack == null || stack.isEmpty()) {
  throw new IllegalStateException("Cannot leave non existing style");
 }
 Style.Composite last = stack.removeLast();
 if (stack.size() > 0) {
  // Compute merged
  Style.Composite merged = getMerged();
  // Compute diff with removed
  Boolean bold = foo(last.getBold(), merged.getBold());
  Boolean underline = foo(last.getUnderline(), merged.getUnderline());
  Boolean blink = foo(last.getBlink(), merged.getBlink());
  // For now we assume that black is the default background color
  // and white is the default foreground color
  Color fg = foo(last.getForeground(), merged.getForeground(), Color.def);
  Color bg = foo(last.getBackground(), merged.getBackground(), Color.def);
  //
  Style.Composite bilto = Style.style(bold, underline, blink, fg, bg);
  //   
  append(bilto);
 } else {
  append(Style.reset);
 }
 return last;
}
origin: org.crashub/crash.shell

public void styleOff() {
 if (stack != null && stack.size() > 0) {
  append(Style.reset);
 }
}
origin: com.github.corda.crash/crash.shell

public void enterStyle(Style.Composite style) {
 if (stack == null) {
  stack = new LinkedList<Style.Composite>();
 }
 append(style);
 stack.addLast(style);
}
origin: org.crashub/crash.shell

public void enterStyle(Style.Composite style) {
 if (stack == null) {
  stack = new LinkedList<Style.Composite>();
 }
 append(style);
 stack.addLast(style);
}
origin: org.crashub/crash.shell

 public void styleOn() {
  if (stack != null && stack.size() > 0) {
   append(getMerged());
  }
 }
}
origin: org.crsh/crsh.shell.core

public void render(RenderAppendable to) {
 Renderer renderer = renderer();
 // For now height - 1 because of the char that goes to the line in some impl
 LineReader reader = renderer.reader(to.getWidth(), to.getHeight() - 1);
 if (reader != null) {
  while (reader.hasLine()) {
   reader.renderLine(to);
   to.append('\n');
  }
 }
}
origin: com.github.corda.crash/crash.shell

public void render(RenderAppendable to) {
 LineRenderer renderer = renderer();
 // For now height - 1 because of the char that goes to the line in some impl
 LineReader reader = renderer.reader(to.getWidth(), to.getHeight() - 1);
 if (reader != null) {
  while (reader.hasLine()) {
   reader.renderLine(to);
   to.append('\n');
  }
 }
}
origin: org.crashub/crash.shell

public void render(RenderAppendable to) {
 LineRenderer renderer = renderer();
 // For now height - 1 because of the char that goes to the line in some impl
 LineReader reader = renderer.reader(to.getWidth(), to.getHeight() - 1);
 if (reader != null) {
  while (reader.hasLine()) {
   reader.renderLine(to);
   to.append('\n');
  }
 }
}
org.crsh.textRenderAppendableappend

Popular methods of RenderAppendable

  • <init>
  • enterStyle
  • flush
  • foo
  • getHeight
  • getMerged
    Compute the current merged style.
  • getWidth
  • leaveStyle
  • styleOff
  • styleOn
  • cls
  • provide
  • cls,
  • provide,
  • safeAppend

Popular in Java

  • Making http post requests using okhttp
  • runOnUiThread (Activity)
  • onCreateOptionsMenu (Activity)
  • getContentResolver (Context)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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