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

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

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

origin: crashub/crash

 public void styleOn() {
  if (stack != null && stack.size() > 0) {
   append(getMerged());
  }
 }
}
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.crsh/crsh.shell.core

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

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

 public void styleOn() {
  if (stack != null && stack.size() > 0) {
   append(getMerged());
  }
 }
}
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.textRenderAppendablegetMerged

Javadoc

Compute the current merged style.

Popular methods of RenderAppendable

  • <init>
  • append
  • enterStyle
  • flush
  • foo
  • getHeight
  • getWidth
  • leaveStyle
  • styleOff
  • styleOn
  • cls
  • provide
  • cls,
  • provide,
  • safeAppend

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSupportFragmentManager (FragmentActivity)
  • getContentResolver (Context)
  • setScale (BigDecimal)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • ImageIO (javax.imageio)
  • Top 12 Jupyter Notebook extensions
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