Tabnine Logo
MObserverHandler
Code IndexAdd Tabnine to your IDE (free)

How to use
MObserverHandler
in
de.mhus.lib.core

Best Java code snippets using de.mhus.lib.core.MObserverHandler (Showing top 9 results out of 315)

origin: de.mhus.lib/mhu-lib-vaadin

public Section setSelected(String name) {
  eventHandler.fireChanged(new Event(this,EVENTS.SECTION_CHANGEING,getSection(name)));
  Section sel = null;
  synchronized (sections) {
    for (Section section : sections) {
      if (section.getName().equals(name)) {
        section.setSelected(true);
        sel = section;
      } else {
        section.setSelected(false);
      }
          
    }
  }
  eventHandler.fireChanged(new Event(this,EVENTS.SECTION_CHANGED,getSection(name)));
  return sel;
}
  
origin: de.mhus.lib/mhu-lib-core

public void fireChanged(Object event) {
  fire(event);
}
origin: de.mhus.lib/mhu-lib-vaadin6

public AbstractSectionsPanel() {
  selector = new SectionsSelector();
  this.addComponent(selector);
  
  content = new Panel();
  this.addComponent(content);
  content.setSizeFull();
  setExpandRatio(content, 1.0f);
  
  selector.eventHandler().register(this);
}

origin: de.mhus.lib/mhu-lib-vaadin

public AbstractSectionsPanel() {
  selector = new SectionsSelector();
  this.addComponent(selector);
  
  content = new Panel();
  this.addComponent(content);
  content.setSizeFull();
  setExpandRatio(content, 1.0f);
  
  selector.eventHandler().register(this);
}

origin: de.mhus.lib/mhu-lib-vaadin6

public Section setSelected(String name) {
  eventHandler.fireChanged(new Event(this,EVENTS.SECTION_CHANGEING,getSection(name)));
  Section sel = null;
  synchronized (sections) {
    for (Section section : sections) {
      if (section.getName().equals(name)) {
        section.setSelected(true);
        sel = section;
      } else {
        section.setSelected(false);
      }
          
    }
  }
  eventHandler.fireChanged(new Event(this,EVENTS.SECTION_CHANGED,getSection(name)));
  return sel;
}
  
origin: de.mhus.lib/mhu-lib-vaadin

public Section addSection(String name, String title, Object userData) {
  Section section = getSection(name);
  if (section != null) {
    section.setTitle(title);
    if (userData != null) section.setUserData(userData);
    eventHandler.fireChanged(new Event(this,EVENTS.UPDATED,section));
  } else {
    section = new Section(name,title);
    section.setUserData(userData);
    eventHandler.fireChanged(new Event(this,EVENTS.ADDED,section));
    if (autoSelect) {
      if (sections.size() == 1) { // first one
        setSelected(name);
      }
    }
  }
  return section;
}

origin: de.mhus.lib/mhu-lib-vaadin6

public Section addSection(String name, String title, Object userData) {
  Section section = getSection(name);
  if (section != null) {
    section.setTitle(title);
    if (userData != null) section.setUserData(userData);
    eventHandler.fireChanged(new Event(this,EVENTS.UPDATED,section));
  } else {
    section = new Section(name,title);
    section.setUserData(userData);
    eventHandler.fireChanged(new Event(this,EVENTS.ADDED,section));
    if (autoSelect) {
      if (sections.size() == 1) { // first one
        setSelected(name);
      }
    }
  }
  return section;
}

origin: de.mhus.lib/mhu-lib-vaadin

public Section removeSection(String name) {
  Section sec = getSection(name);
  if (autoSelect && sec.isSelected()) {
    synchronized (sections) {
      for (Section section : sections) {
        if (section.isEnabled()) {
          setSelected(section.getName());
          break;
        }
      }
    }
  }
  synchronized (sections) {
    if (sec == null) return null;
    sections.remove(sec);
  }
  
  
  eventHandler.fireChanged(new Event(this,EVENTS.REMOVED,sec));
  return sec;
}

origin: de.mhus.lib/mhu-lib-vaadin6

public Section removeSection(String name) {
  Section sec = getSection(name);
  if (autoSelect && sec.isSelected()) {
    synchronized (sections) {
      for (Section section : sections) {
        if (section.isEnabled()) {
          setSelected(section.getName());
          break;
        }
      }
    }
  }
  synchronized (sections) {
    if (sec == null) return null;
    sections.remove(sec);
  }
  
  
  eventHandler.fireChanged(new Event(this,EVENTS.REMOVED,sec));
  return sec;
}

de.mhus.lib.coreMObserverHandler

Most used methods

  • fireChanged
  • register
  • fire

Popular in Java

  • Making http requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSystemService (Context)
  • getExternalFilesDir (Context)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • 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