Пример #1
0
  public ViewportPlacer(Dimension desktopSize, ConfigContext ctx, ConfigElement elt) {
    model = new ViewportPlacerModel(desktopSize, ctx, elt);

    try {
      jbInit();
    } catch (Exception e) {
      e.printStackTrace();
    }

    // Setup the viewport placer.
    wndPlacer.setModel(model);
    wndPlacer.setRenderer(new ViewportRenderer());
  }
Пример #2
0
  public NodeSettingsPanel() {
    try {
      jbInit();
    } catch (Exception e) {
      e.printStackTrace();
    }
    // Try to get icons for the toolbar buttons
    try {
      ClassLoader loader = getClass().getClassLoader();
      mClusterIcon = new ImageIcon(loader.getResource(COMMON_IMG_ROOT + "/ClusterIcon.png"));

      mIconLabel.setIcon(mClusterIcon);
    } catch (Exception e) {
      // Ack! No icons. Use text labels instead
      mIconLabel.setText("");
    }
  }