public void internalFrameClosed(InternalFrameEvent e) {
   Component cont = getParent();
   while ((cont != null) && (!(cont instanceof JInternalFrame))) {
     cont = cont.getParent();
   }
   if (cont != null) {
     if (!((JInternalFrame) cont).isClosed()) {
       refreshMe();
     }
   }
 }
  // java.awt.Toolkit#getNativeContainer() is not available
  //  from this package
  private WComponentPeer getNearestNativePeer(Component comp) {
    if (comp == null) return null;

    ComponentPeer peer = comp.getPeer();
    if (peer == null) return null;

    while (peer instanceof java.awt.peer.LightweightPeer) {
      comp = comp.getParent();
      if (comp == null) return null;
      peer = comp.getPeer();
      if (peer == null) return null;
    }

    if (peer instanceof WComponentPeer) return (WComponentPeer) peer;
    else return null;
  }
    /** refreshes the parents */
    protected void refreshParents() {

      if (componentToRefresh != null) {

        componentToRefresh.repaint();
      }
    }
 public void refreshMe() {
   Component cont = getParent();
   while ((cont != null) && (!(cont instanceof JInternalFrame))) {
     cont = cont.getParent();
   }
   if (cont != null) {
     if (!((JInternalFrame) cont).isClosed()) {
       Collection<ICFBamParamObj> dataCollection;
       ICFBamServerListFuncObj focus = getSwingFocusAsServerListFunc();
       if (focus != null) {
         dataCollection = focus.getOptionalComponentsParams(swingIsInitializing);
       } else {
         dataCollection = null;
       }
       JPanel panel = getTabViewComponentsParamsListJPanel();
       ICFBamSwingParamJPanelList jpList = (ICFBamSwingParamJPanelList) panel;
       jpList.setSwingDataCollection(dataCollection);
     }
   }
 }
 public void refreshMe() {
   Component cont = getParent();
   while ((cont != null) && (!(cont instanceof JInternalFrame))) {
     cont = cont.getParent();
   }
   if (cont != null) {
     if (!((JInternalFrame) cont).isClosed()) {
       Collection<ICFBamClearSubDep1Obj> dataCollection;
       ICFBamClearTopDepObj focus = (ICFBamClearTopDepObj) getSwingFocusAsClearTopDep();
       if (focus != null) {
         dataCollection = focus.getOptionalComponentsClearDep(swingIsInitializing);
       } else {
         dataCollection = null;
       }
       JPanel panel = getTabViewComponentsClearDepListJPanel();
       ICFBamSwingClearSubDep1JPanelList jpList = (ICFBamSwingClearSubDep1JPanelList) panel;
       jpList.setSwingDataCollection(dataCollection);
     }
   }
 }
 public void refreshMe() {
   Component cont = getParent();
   while ((cont != null) && (!(cont instanceof JInternalFrame))) {
     cont = cont.getParent();
   }
   if (cont != null) {
     if (!((JInternalFrame) cont).isClosed()) {
       Collection<ICFBamTableColObj> dataCollection;
       ICFBamTextTypeObj focus = (ICFBamTextTypeObj) getSwingFocusAsTextType();
       if (focus != null) {
         dataCollection = focus.getOptionalChildrenRef(swingIsInitializing);
       } else {
         dataCollection = null;
       }
       JPanel panel = getTabViewChildrenRefListJPanel();
       ICFBamSwingTableColJPanelList jpList = (ICFBamSwingTableColJPanelList) panel;
       jpList.setSwingDataCollection(dataCollection);
     }
   }
 }
 public void refreshMe() {
   Component cont = getParent();
   while ((cont != null) && (!(cont instanceof JInternalFrame))) {
     cont = cont.getParent();
   }
   if (cont != null) {
     if (!((JInternalFrame) cont).isClosed()) {
       Collection<ICFInternetMinorVersionObj> dataCollection;
       ICFAccMajorVersionObj focus = (ICFAccMajorVersionObj) getSwingFocusAsMajorVersion();
       if (focus != null) {
         dataCollection = focus.getOptionalComponentsMinorVersion(swingIsInitializing);
       } else {
         dataCollection = null;
       }
       JPanel panel = getTabViewComponentsMinorVersionListJPanel();
       ICFAccSwingMinorVersionJPanelList jpList = (ICFAccSwingMinorVersionJPanelList) panel;
       jpList.setSwingDataCollection(dataCollection);
     }
   }
 }
 public void choseTenant(ICFSecurityTenantObj value) {
   Component cont = getParent();
   while ((cont != null) && (!(cont instanceof JInternalFrame))) {
     cont = cont.getParent();
   }
   if (cont != null) {
     if (!((JInternalFrame) cont).isClosed()) {
       if (swingReferenceOwnerTenant != null) {
         ICFInternetDomainBaseObj cur = getSwingFocusAsDomainBase();
         if (cur != null) {
           ICFInternetDomainBaseEditObj editObj = (ICFBamDomainBaseEditObj) cur.getEdit();
           if (null != editObj) {
             CFJPanel.PanelMode curMode = getPanelMode();
             if ((curMode == CFJPanel.PanelMode.Add) || (curMode == CFJPanel.PanelMode.Edit)) {
               swingReferenceOwnerTenant.setReferencedObject(value);
               editObj.setRequiredOwnerTenant(value);
             }
           }
         }
       }
     }
   }
 }
 public void choseSecUser(ICFSecuritySecUserObj value) {
   Component cont = getParent();
   while ((cont != null) && (!(cont instanceof JInternalFrame))) {
     cont = cont.getParent();
   }
   if (cont != null) {
     if (!((JInternalFrame) cont).isClosed()) {
       if (swingReferenceContainerSecUser != null) {
         ICFSecuritySecSessionObj cur = getSwingFocusAsSecSession();
         if (cur != null) {
           ICFSecuritySecSessionEditObj editObj = (ICFDbTestSecSessionEditObj) cur.getEdit();
           if (null != editObj) {
             CFJPanel.PanelMode curMode = getPanelMode();
             if ((curMode == CFJPanel.PanelMode.Add) || (curMode == CFJPanel.PanelMode.Edit)) {
               swingReferenceContainerSecUser.setReferencedObject(value);
               editObj.setRequiredContainerSecUser(value);
             }
           }
         }
       }
     }
   }
 }
Example #10
0
 /** Prepare ball images with different sizes */
 private void makeBalls() {
   balls = new Image[nBalls];
   byte red[] = new byte[256];
   byte green[] = new byte[256];
   byte blue[] = new byte[256];
   for (int id = 0; id < nBalls; id++) {
     // smaller `b' means closer to black
     // if id == 0 (fartherest from the viewer)
     //        b = 1/(1 + zContrast)
     //        the outer blend() gives a color close to bgGrey
     // if id == nBalls - 1 (closest to the viewer),
     //        b = 1, the outer blend() gives the color of
     //        the inner blend()
     double b = (zContrast * id / (nBalls - 1) + 1) / (zContrast + 1);
     for (int i = maxr; i >= 0; --i) {
       // closeness to the spotlight
       double q = 1 - 1. * i / maxr;
       // dampness of the color along the radius
       double p = 1 - rContrast * i / maxr;
       // contrast of the spotlight
       // if i == 0 (closest to the spotlight),
       //        d = 1.0 - spotlightAmp, the inner
       //        blend() gives a color close to 255
       //        (if spotlightAmp == 1).
       // if i == maxr (fartherest from the spotlight),
       //        d = 1.0, the inner blend() gives
       //        the foreground color, i.e., Rl, Gl, Bl
       // Thus, the inner blend() depends on the distance
       // from the spotlight, i == 0 means to be closest
       // to the spotlight
       double d = 1 - q * spotlightAmp;
       red[i] = (byte) blend(blend(Rl * p, 255, d), 0, b);
       green[i] = (byte) blend(blend(Gl * p, 255, d), 0, b);
       blue[i] = (byte) blend(blend(Bl * p, 255, d), 0, b);
     }
     // 256 color model
     IndexColorModel model = new IndexColorModel(8, maxr + 1, red, green, blue, 0);
     balls[id] = component.createImage(new MemoryImageSource(R * 2, R * 2, model, data, 0, R * 2));
   }
 }