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

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

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

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: com.github.corda.crash/crash.shell

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 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.crsh/crsh.shell.core

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);
  //   
  safeAppend(bilto);
 } else {
  safeAppend(Style.reset);
 }
 return last;
}
org.crsh.textRenderAppendablefoo

Popular methods of RenderAppendable

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

Popular in Java

  • Running tasks concurrently on multiple threads
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • onRequestPermissionsResult (Fragment)
  • runOnUiThread (Activity)
  • Path (java.nio.file)
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Reference (javax.naming)
  • Github Copilot 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