congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
WatermarkerSetup
Code IndexAdd Tabnine to your IDE (free)

How to use
WatermarkerSetup
in
me.itzsomebody.radon.transformers.miscellaneous.watermarker

Best Java code snippets using me.itzsomebody.radon.transformers.miscellaneous.watermarker.WatermarkerSetup (Showing top 5 results out of 315)

origin: ItzSomebody/Radon

/**
 * Creates an {@link Watermarker} transformer setup accordingly to the information provided in this
 * {@link WatermarkingTab}.
 *
 * @return an {@link Watermarker} transformer setup accordingly to the information provided in this
 * {@link WatermarkingTab}.
 */
public Watermarker getWatermarker() {
  return (watermarkerEnabledCheckBox.isSelected())
      ? new Watermarker(new WatermarkerSetup(watermarkMessageField.getText(),
      watermarkKeyField.getText())) : null;
}
origin: ItzSomebody/Radon

private Stack<Character> cipheredWatermark() {
  char[] messageChars = setup.getMessage().toCharArray();
  char[] keyChars = setup.getKey().toCharArray();
  Stack<Character> returnThis = new Stack<>();
  for (int i = 0; i < messageChars.length; i++) {
    returnThis.push((char) (messageChars[i] ^ keyChars[i % keyChars.length]));
  }
  return returnThis;
}
origin: ItzSomebody/Radon

  /**
   * Sets the tab settings accordingly with the provided {@link SessionInfo}.
   *
   * @param info the {@link SessionInfo} used to determine the tab setup.
   */
  public void setSettings(SessionInfo info) {
    watermarkerEnabledCheckBox.setSelected(false);
    watermarkMessageField.setText(null);
    watermarkMessageField.setEditable(false);
    watermarkKeyField.setText(null);
    watermarkKeyField.setEditable(false);

    if (info.getTransformers() != null) {
      info.getTransformers().stream().filter(transformer ->
          transformer instanceof Watermarker).forEach(transformer -> {
        watermarkerEnabledCheckBox.setSelected(true);
        watermarkMessageField.setEditable(true);
        watermarkKeyField.setEditable(true);

        WatermarkerSetup setup = ((Watermarker) transformer).getSetup();

        watermarkMessageField.setText(setup.getMessage());
        watermarkKeyField.setText(setup.getKey());
      });
    }
  }
}
origin: ItzSomebody/Radon

private Watermarker getWatermarkerTransformer() {
  Object o = map.get(ConfigurationSettings.WATERMARK.getValue());
  if (o == null)
    return null;
  if (!(o instanceof Map))
    throw new IllegalConfigurationValueException(ConfigurationSettings.WATERMARK.getValue(), Map.class,
        o.getClass());
  try {
    Map<String, Object> settings = (Map) o;
    if (!(Boolean) settings.get("Enabled"))
      return null;
    String message = (String) settings.get("Message");
    String key = (String) settings.get("Key");
    return new Watermarker(new WatermarkerSetup(message, key));
  } catch (ClassCastException e) {
    throw new IllegalConfigurationValueException("Error while parsing watermark setup: " + e.getMessage());
  }
}
origin: ItzSomebody/Radon

    new LinkedHashMap<String, Object>());
((LinkedHashMap) documentMap.get(ConfigurationSettings.WATERMARK.getValue())).put("Enabled", true);
if (watermarker.getSetup().getMessage() != null)
  ((LinkedHashMap) documentMap.get(ConfigurationSettings.WATERMARK.getValue()))
      .put("Message", watermarker.getSetup().getMessage());
if (watermarker.getSetup().getKey() != null)
  ((LinkedHashMap) documentMap.get(ConfigurationSettings.WATERMARK.getValue()))
      .put("Key", watermarker.getSetup().getKey());
me.itzsomebody.radon.transformers.miscellaneous.watermarkerWatermarkerSetup

Javadoc

Used to hold the information needed for enabling the Watermarker transformer.

Most used methods

  • <init>
  • getKey
  • getMessage

Popular in Java

  • Updating database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • onCreateOptionsMenu (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • 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