Пример #1
0
 @Override
 public void hierarchyChanged() {
   super.hierarchyChanged();
   VideoContext ctxt = getLookup().get(VideoContext.class);
   if (ctxt != context) {
     if (context != null) {
       context.unregisterVideoOutputClient(client);
       context = null;
     }
     if (ctxt == null) {
       return;
     }
     try {
       ctxt.registerVideoOutputClient(client);
       context = ctxt;
     } catch (ClientRegistrationException ex) {
       Logger.getLogger(VideoOutput.class.getName()).log(Level.SEVERE, null, ex);
     }
   }
   ComponentAddress ad = getAddress();
   if (ad != null) {
     defaultTitle = DEF_TITLE_PREFIX + "/" + ad.getRootID();
   } else {
     defaultTitle = DEF_TITLE_PREFIX;
   }
   if (title.isEmpty()) {
     wHints.setTitle(defaultTitle);
   }
 }
Пример #2
0
 @Override
 public void parentNotify(Container parent) throws VetoException {
   if (EventQueue.isDispatchThread()) {
     super.parentNotify(parent);
     // call getSwingComponent() early to ensure JComponent creation
     getSwingComponent();
   } else {
     throw new VetoException("Trying to install GUI component in GUI incompatible container.");
   }
 }
Пример #3
0
 @Override
 public void hierarchyChanged() {
   super.hierarchyChanged();
   //        getSwingComponent().putClientProperty(Keys.Address, getAddress());
   GuiContext ctxt = getLookup().get(GuiContext.class);
   if (context != ctxt) {
     if (context != null) {
       context.getContainer().remove(getSwingComponent());
     }
     if (ctxt != null) {
       ctxt.getContainer().add(getSwingComponent());
     }
     context = ctxt;
   }
   getSwingComponent().putClientProperty(Keys.Address, getAddress());
 }