GVKun编程网logo

java.beans.VetoableChangeListener的实例源码(java.beans.introspection)

17

关于java.beans.VetoableChangeListener的实例源码和java.beans.introspection的问题就给大家分享到这里,感谢你花时间阅读本站内容,更多关于andro

关于java.beans.VetoableChangeListener的实例源码java.beans.introspection的问题就给大家分享到这里,感谢你花时间阅读本站内容,更多关于android.media.ImageReader.OnImageAvailableListener的实例源码、android.os.storage.OnObbStateChangeListener的实例源码、android.widget.CalendarView.OnDateChangeListener的实例源码、android.widget.CompoundButton.OnCheckedChangeListener的实例源码等相关知识的信息别忘了在本站进行查找喔。

本文目录一览:

java.beans.VetoableChangeListener的实例源码(java.beans.introspection)

java.beans.VetoableChangeListener的实例源码(java.beans.introspection)

项目:incubator-netbeans    文件:FormCustomEditor.java   
/**
 * Used by PropertyAction to mimic property sheet behavior - trying to invoke
 * PropertyEnv listener of the current property editor (we can't create our
 * own PropertyEnv instance).
 * 
 * @return current value
 * @throws java.beans.PropertyVetoException if someone vetoes this change.
 */
public Object commitChanges() throws PropertyVetoException {
    int currentIndex = editorsCombo.getSelectedindex();
    propertyeditor currentEditor = currentIndex > -1 ? allEditors[currentIndex] : null;
    if (currentEditor instanceof Expropertyeditor) {
        // we can only guess - according to the typical pattern the propetry
        // editor itself or the custom editor usually implement the listener
        // registered in PropertyEnv
        PropertyChangeEvent evt = new PropertyChangeEvent(
                this,PropertyEnv.PROP_STATE,null,PropertyEnv.STATE_VALID);
        if (currentEditor instanceof Vetoablechangelistener) {
            ((Vetoablechangelistener)currentEditor).vetoableChange(evt);
        }
        Component currentCustEd = currentIndex > -1 ? allCustomEditors[currentIndex] : null;
        if (currentCustEd instanceof Vetoablechangelistener) {
            ((Vetoablechangelistener)currentCustEd).vetoableChange(evt);
        }
        if (currentEditor instanceof Propertychangelistener) {
            ((Propertychangelistener)currentEditor).propertyChange(evt);
        }
        if (currentCustEd instanceof Propertychangelistener) {
            ((Propertychangelistener)currentCustEd).propertyChange(evt);
        }
    }
    return commitChanges0();
}
项目:incubator-netbeans    文件:ExplorerManagerTest.java   
public void testSetNodesSurviveChangeOfNodes() throws Exception {
    final Node a = keys.key("toRemove");

    class ChangeTheSelectionInMiddleOfMethod implements Vetoablechangelistener {
        public int cnt;

        public void vetoableChange(PropertyChangeEvent evt) {
            cnt++;
            keys.keys(new String[0]);
        }
    }

    ChangeTheSelectionInMiddleOfMethod list = new ChangeTheSelectionInMiddleOfMethod();
    em.addVetoablechangelistener(list);

    em.setSelectednodes(new Node[] { a });

    assertEquals("Vetoable listener called",1,list.cnt);
    assertEquals("Node is dead",a.getParentNode());

    // handling of removed nodes is done asynchronously
    em.waitFinished();

    Node[] arr = em.getSelectednodes();
    assertEquals("No nodes can be selected",arr.length);
}
项目:incubator-netbeans    文件:ExplorerManagerTest.java   
public void testCannotVetoSetToEmptySelection() throws Exception {
    final Node a = keys.key("toRemove");

    em.setSelectednodes(new Node[] { a });

    class NeverCalledVeto implements Vetoablechangelistener {
        public int cnt;

        public void vetoableChange(PropertyChangeEvent evt) {
            cnt++;
            keys.keys(new String[0]);
        }
    }

    NeverCalledVeto list = new NeverCalledVeto();
    em.addVetoablechangelistener(list);

    em.setSelectednodes(new Node[0]);

    assertEquals("Veto not called",list.cnt);
    Node[] arr = em.getSelectednodes();
    assertEquals("No nodes can be selected",arr.length);
}
项目:parabuild-ci    文件:VetoableChangeMulticaster.java   
/**
  * Add a Propertychangelistener to the listener list if it is 
  * not already present.
  * The listener is registered for all properties.
  * The operation maintains Set semantics: If the listener is already 
  * registered,the operation has no effect.
  *
  * @param listener  The Propertychangelistener to be added
  * @exception NullPointerException If listener is null
  */

 public synchronized void addVetoablechangelistenerIfAbsent(Vetoablechangelistener listener) {

   if (listener == null) throw new NullPointerException();

   // copy while checking if already present.
   int len = listeners.length; 
   Vetoablechangelistener[] newArray = new Vetoablechangelistener[len + 1];
   for (int i = 0; i < len; ++i) {
     newArray[i] = listeners[i];
     if (listener.equals(listeners[i]))
return; // already present -- throw away copy
   }
   newArray[len] = listener;
   listeners = newArray;
 }
项目:incubator-netbeans    文件:PropertiesOpen.java   
private void addListener(PropertiesDataObject dataObj) {
    Propertychangelistener l =weakEnvPropListeners.get(dataObj);
    Vetoablechangelistener v = weakEnvVetoListeners.get(dataObj);
    if (l != null) {
        dataObj.removePropertychangelistener(l);
    } else {
        l = WeakListeners.propertyChange(this,dataObj);
        weakEnvPropListeners.put(dataObj,l);
    }
    if (v != null) {
        dataObj.removeVetoablechangelistener(v);
    } else {
        v = WeakListeners.vetoableChange(this,dataObj);
        weakEnvVetoListeners.put(dataObj,v);
    }
    dataObj.addPropertychangelistener(l);
    dataObj.addVetoablechangelistener(v);
}
项目:incubator-netbeans    文件:PropertiesOpen.java   
private  void addListeners() {
    BundleStructure structure = bundleStructure;
    PropertiesDataObject dataObj;
    weakEnvPropListeners = new HashMap<PropertiesDataObject,Propertychangelistener>();
    weakEnvVetoListeners = new HashMap<PropertiesDataObject,Vetoablechangelistener>();
    Propertychangelistener l;
    Vetoablechangelistener v;
    for(int i=0;i<structure.getEntryCount();i++) {
        dataObj = (PropertiesDataObject) structure.getNthEntry(i).getDataObject();
        l = WeakListeners.propertyChange(this,l);
        dataObj.addPropertychangelistener(l);
        v = WeakListeners.vetoableChange(this,v);
        dataObj.addVetoablechangelistener(v);
    }

}
项目:incubator-netbeans    文件:PropertiesOpen.java   
private void removeListeners() {
    BundleStructure structure = bundleStructure;
    PropertiesDataObject dataObj;
    Propertychangelistener l;
    Vetoablechangelistener v;
    for(int i=0;i<structure.getEntryCount();i++) {
        dataObj = (PropertiesDataObject) structure.getNthEntry(i).getDataObject();
        l = weakEnvPropListeners.remove(dataObj);
        v = weakEnvVetoListeners.remove(dataObj);
        if (l!=null) {
            dataObj.removePropertychangelistener(l);
        }
        if (v!=null) {
            dataObj.removeVetoablechangelistener(v);
        }
    }
}
项目:incubator-netbeans    文件:BaseDocument.java   
final void atomicUnlockImpl (boolean notifyUnmodifyIfNoMods) {
    boolean noModsAndOuterUnlock = false;
    synchronized (this) {
        if (atomicDepth <= 0) {
            throw new IllegalStateException("atomicUnlock() without atomicLock()"); // NOI18N
        }

        if (--atomicDepth == 0) { // lock really ended
            fireAtomicUnlock(atomicLockEventInstance);

            noModsAndOuterUnlock = !checkAndFireAtomicEdits();
            atomicLockListenerList = null;
            extWriteUnlock();
        }
    }

    if (notifyUnmodifyIfNoMods && noModsAndOuterUnlock) {
        // Notify unmodification if there were no document modifications
        // inside the atomic section.
        // Fire Vetoablechangelistener outside Document lock
        Vetoablechangelistener l = (Vetoablechangelistener) getProperty(MODIFICATION_LISTENER_PROP);
        if (l != null) {
            try {
                // Notify unmodification by Boolean.FALSE
                l.vetoableChange(new PropertyChangeEvent(this,"modified",Boolean.FALSE));
            } catch (java.beans.PropertyVetoException ex) {
                // Ignored (should not be thrown)
            }
        }
    }
}
项目:incubator-netbeans    文件:NbLikeEditorKit.java   
private boolean notifyModified (Object o) {
    boolean canBeModified = true;
    if (o instanceof Vetoablechangelistener) {
        Vetoablechangelistener l = (Vetoablechangelistener)o;
        try {
            l.vetoableChange (new java.beans.PropertyChangeEvent (this,Boolean.TRUE));
        } catch (java.beans.PropertyVetoException ex) {
            canBeModified = false;
        }
    }
    return canBeModified;
}
项目:intellij-deps-ini4j    文件:AbstractBeanInvocationHandler.java   
protected synchronized void removeVetoablechangelistener(String property,Vetoablechangelistener listener)
{
    if (_vcSupport != null)
    {
        _vcSupport.removeVetoablechangelistener(property,listener);
    }
}
项目:Openjsharp    文件:JComponent.java   
/**
 * Adds a <code>Vetoablechangelistener</code> to the listener list.
 * The listener is registered for all properties.
 *
 * @param listener  the <code>Vetoablechangelistener</code> to be added
 */
public synchronized void addVetoablechangelistener(Vetoablechangelistener listener) {
    if (vetoableChangeSupport == null) {
        vetoableChangeSupport = new java.beans.VetoableChangeSupport(this);
    }
    vetoableChangeSupport.addVetoablechangelistener(listener);
}
项目:openjdk-jdk10    文件:BeanContextSupport.java   
/**
 * Gets the Vetoablechangelistener
 * (if any) of the specified child
 * @param child the specified child
 * @return the Vetoablechangelistener (if any) of the specified child
 */
protected static final Vetoablechangelistener getChildVetoablechangelistener(Object child) {
    try {
        return (Vetoablechangelistener)child;
    } catch (ClassCastException cce) {
        return null;
    }
}
项目:parabuild-ci    文件:VetoableChangeMulticaster.java   
/**
 * Add a Vetoablechangelistener to the listener list.
 * The listener is registered for all properties.
 * If the listener is added multiple times,it will
 * receive multiple change notifications upon any fireVetoableChange.
 *
 * @param listener  The Vetoablechangelistener to be added
 */

public synchronized void addVetoablechangelistener(Vetoablechangelistener listener) {

  if (listener == null) throw new NullPointerException();

  int len = listeners.length;
  Vetoablechangelistener[] newArray = new Vetoablechangelistener[len + 1];
  if (len > 0)
    System.arraycopy(listeners,newArray,len);
  newArray[len] = listener;
  listeners = newArray;
}
项目:jdk8u-jdk    文件:JComponent.java   
/**
 * Adds a <code>Vetoablechangelistener</code> to the listener list.
 * The listener is registered for all properties.
 *
 * @param listener  the <code>Vetoablechangelistener</code> to be added
 */
public synchronized void addVetoablechangelistener(Vetoablechangelistener listener) {
    if (vetoableChangeSupport == null) {
        vetoableChangeSupport = new java.beans.VetoableChangeSupport(this);
    }
    vetoableChangeSupport.addVetoablechangelistener(listener);
}
项目:incubator-netbeans    文件:SectionPanel.java   
protected void openInnerPanel() {
    if (toolBarDesignEditor == null) {
        toolBarDesignEditor = sectionView.getToolBarDesignEditor();
        if (toolBarDesignEditor != null) {
            toolBarDesignEditor.addVetoablechangelistener(new Vetoablechangelistener() {
                public void vetoableChange(PropertyChangeEvent evt) throws PropertyVetoException {
                    if (ToolBarDesignEditor.PROPERTY_FLUSH_DATA.equals(evt.getPropertyName()) &&
                            evt.getNewValue() == null) {
                        if (innerPanel != null && !innerPanel.canClose()) {
                            throw new PropertyVetoException("",evt);
                        }
                    }
                }
            });
        }
    }
    if (innerPanel != null) {
        return;
    }
    innerPanel = createInnerpanel();
    java.awt.GridBagConstraints gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(2,0);
    fillerLine.setVisible(true);
    fillerEnd.setVisible(true);
    innerPanel.addFocusListener(sectionFocusListener);
    add(innerPanel,gridBagConstraints);
    Utils.scrollToVisible(this);
    // issue 233048: the background color issues with dark Metal L&F
    // innerPanel.setBackground(
    //      active ? SectionVisualTheme.getSectionActiveBackgroundColor() : SectionVisualTheme.getDocumentBackgroundColor());
}
项目:incubator-netbeans    文件:FileSystem.java   
/** Adds listener for the veto of property change.
* @param listener the listener
*/
public final void addVetoablechangelistener(Vetoablechangelistener listener) {
    synchronized (internLock) {
        if (vetoablechangelist == null) {
            vetoablechangelist = new ListenerList<Vetoablechangelistener>();
        }

        vetoablechangelist.add(listener);
    }
}
项目:incubator-netbeans    文件:FileSystemTestHid.java   
private Vetoablechangelistener createVetoablechangelistener () {
    return new Vetoablechangelistener  () {
        public void vetoableChange(PropertyChangeEvent evt) throws PropertyVetoException {
                abacus++;            
        }
    };

}
项目:incubator-netbeans    文件:VetoSystemOption.java   
/** Fire a property change event.
* @param name the name of the property
* @param oldValue the old value
* @param newValue the new value
* @exception PropertyVetoException if the change is vetoed
*/
public final void fireVetoableChange(String name,Object oldValue,Object newValue)
throws PropertyVetoException {
    PropertyChangeEvent ev = new PropertyChangeEvent(this,name,oldValue,newValue);

    Iterator en;

    synchronized (getLock()) {
        en = ((HashSet) getVeto().clone()).iterator();
    }

    while (en.hasNext()) {
        ((Vetoablechangelistener) en.next()).vetoableChange(ev);
    }
}
项目:incubator-netbeans    文件:WeakListenerImpl.java   
/** Tests if the object we reference to still exists and
* if so,delegate to it. Otherwise remove from the source
* if it has removePropertychangelistener method.
*/
@Override public void vetoableChange(PropertyChangeEvent ev)
throws PropertyVetoException {
    Vetoablechangelistener l = (Vetoablechangelistener) super.get(ev);

    if (l != null) {
        l.vetoableChange(ev);
    }
}
项目:incubator-netbeans    文件:MultiViewEditorElementTest.java   
/** Adds veto listener.
 */
@Override
public void addVetoablechangelistener(Vetoablechangelistener l) {
}
项目:incubator-netbeans    文件:MultiViewEditorElementTest.java   
/** Removes veto listener.
 */
@Override
public void removeVetoablechangelistener(Vetoablechangelistener l) {
}
项目:incubator-netbeans    文件:MultiViewEditorCloneTest.java   
/** Adds veto listener.
 */
@Override
public void addVetoablechangelistener(Vetoablechangelistener l) {
}
项目:incubator-netbeans    文件:MultiViewEditordiscardTest.java   
/** Adds veto listener.
 */
@Override
public void addVetoablechangelistener(Vetoablechangelistener l) {
}
项目:incubator-netbeans    文件:MultiViewEditordiscardTest.java   
/** Removes veto listener.
 */
@Override
public void removeVetoablechangelistener(Vetoablechangelistener l) {
}
项目:incubator-netbeans    文件:UndoableEditWrapperTest.java   
@Override
public synchronized void addVetoablechangelistener(Vetoablechangelistener l) {
    assertNull ("This is the first veto listener",vetoL);
    vetoL = l;
}
项目:incubator-netbeans    文件:UndoableEditWrapperTest.java   
@Override
public void removeVetoablechangelistener(Vetoablechangelistener l) {
    assertEquals ("Removing the right veto one",vetoL,l);
    vetoL = null;
}
项目:jdk8u-jdk    文件:JComponent.java   
/**
 * Returns an array of all the objects currently registered
 * as <code><em>Foo</em>Listener</code>s
 * upon this <code>JComponent</code>.
 * <code><em>Foo</em>Listener</code>s are registered using the
 * <code>add<em>Foo</em>Listener</code> method.
 *
 * <p>
 *
 * You can specify the <code>listenerType</code> argument
 * with a class literal,* such as
 * <code><em>Foo</em>Listener.class</code>.
 * For example,you can query a
 * <code>JComponent</code> <code>c</code>
 * for its mouse listeners with the following code:
 * <pre>MouseListener[] mls = (MouseListener[])(c.getListeners(MouseListener.class));</pre>
 * If no such listeners exist,this method returns an empty array.
 *
 * @param listenerType the type of listeners requested; this parameter
 *          should specify an interface that descends from
 *          <code>java.util.EventListener</code>
 * @return an array of all objects registered as
 *          <code><em>Foo</em>Listener</code>s on this component,*          or an empty array if no such
 *          listeners have been added
 * @exception ClassCastException if <code>listenerType</code>
 *          doesn't specify a class or interface that implements
 *          <code>java.util.EventListener</code>
 *
 * @since 1.3
 *
 * @see #getVetoablechangelisteners
 * @see #getAncestorListeners
 */
public <T extends EventListener> T[] getListeners(Class<T> listenerType) {
    T[] result;
    if (listenerType == AncestorListener.class) {
        // AncestorListeners are handled by the AncestorNotifier
        result = (T[])getAncestorListeners();
    }
    else if (listenerType == Vetoablechangelistener.class) {
        // Vetoablechangelisteners are handled by VetoableChangeSupport
        result = (T[])getVetoablechangelisteners();
    }
    else if (listenerType == Propertychangelistener.class) {
        // Propertychangelisteners are handled by PropertyChangeSupport
        result = (T[])getPropertychangelisteners();
    }
    else {
        result = listenerList.getListeners(listenerType);
    }

    if (result.length == 0) {
        return super.getListeners(listenerType);
    }
    return result;
}
项目:incubator-netbeans    文件:EditablePropertydisplayer.java   
void setRemoteEnvVetoListener(Vetoablechangelistener vl) {
    remotevEnvListener = vl;
}
项目:incubator-netbeans    文件:PropertyEnv.java   
/**
 * Vetoable change listener removal.
 */
public void removeVetoablechangelistener(Vetoablechangelistener l) {
    getSupport().removeVetoablechangelistener(l);
}
项目:incubator-netbeans    文件:Deadlock169717Test.java   
public synchronized void addVetoablechangelistener(Vetoablechangelistener l) {
    assertNull ("This is the first veto listener",vetoL);
    vetoL = l;
}
项目:incubator-netbeans    文件:Deadlock169717Test.java   
public void removeVetoablechangelistener(Vetoablechangelistener l) {
    assertEquals ("Removing the right veto one",l);
    vetoL = null;
}
项目:incubator-netbeans    文件:CloneableEditorRecentPaneTest.java   
public synchronized void addVetoablechangelistener(Vetoablechangelistener l) {
    assertNull ("This is the first veto listener",vetoL);
    vetoL = l;
}
项目:incubator-netbeans    文件:CloneableEditorRecentPaneTest.java   
public void removeVetoablechangelistener(Vetoablechangelistener l) {
    assertEquals ("Removing the right veto one",l);
    vetoL = null;
}
项目:incubator-netbeans    文件:CloneableEditor143143Test.java   
public synchronized void addVetoablechangelistener(Vetoablechangelistener l) {
    assertNull ("This is the first veto listener",vetoL);
    vetoL = l;
}
项目:incubator-netbeans    文件:CloneableEditor143143Test.java   
public void removeVetoablechangelistener(Vetoablechangelistener l) {
    assertEquals ("Removing the right veto one",l);
    vetoL = null;
}
项目:incubator-netbeans    文件:CloneableEditorDocumentGCTest.java   
public void removeVetoablechangelistener(Vetoablechangelistener l) {
    assertEquals ("Removing the right veto one",l);
    vetoL = null;
}
项目:incubator-netbeans    文件:CloneableEditorCreationFinishedTest.java   
public synchronized void addVetoablechangelistener(Vetoablechangelistener l) {
    assertNull ("This is the first veto listener",vetoL);
    vetoL = l;
}
项目:incubator-netbeans    文件:CloneableEditorCreationFinishedTest.java   
public void removeVetoablechangelistener(Vetoablechangelistener l) {
    assertEquals ("Removing the right veto one",l);
    vetoL = null;
}
项目:incubator-netbeans    文件:EditToBeUndoneRedoneTest.java   
public synchronized void addVetoablechangelistener(Vetoablechangelistener l) {
    assertNull ("This is the first veto listener",vetoL);
    vetoL = l;
}
项目:incubator-netbeans    文件:EmptyCESHidden.java   
/** Removes veto listener.
 */
public void removeVetoablechangelistener(Vetoablechangelistener l) {
}

android.media.ImageReader.OnImageAvailableListener的实例源码

android.media.ImageReader.OnImageAvailableListener的实例源码

项目:snu-artoon    文件:CameraConnectionFragment.java   
private CameraConnectionFragment(
        final ConnectionCallback connectionCallback,final OnImageAvailableListener imageListener,final int layout,final Size inputSize) {
    this.cameraConnectionCallback = connectionCallback;
    this.imageListener = imageListener;
    this.layout = layout;
    this.inputSize = inputSize;
}
项目:snu-artoon    文件:CameraConnectionFragment.java   
public static CameraConnectionFragment newInstance(
        final ConnectionCallback callback,final Size inputSize) {
    return new CameraConnectionFragment(callback,imageListener,layout,inputSize);
}
项目:TensorflowAndroidDemo    文件:CameraConnectionFragment.java   
private CameraConnectionFragment(
    final ConnectionCallback connectionCallback,final Size inputSize) {
  this.cameraConnectionCallback = connectionCallback;
  this.imageListener = imageListener;
  this.layout = layout;
  this.inputSize = inputSize;
}
项目:TensorflowAndroidDemo    文件:CameraConnectionFragment.java   
public static CameraConnectionFragment newInstance(
    final ConnectionCallback callback,final Size inputSize) {
  return new CameraConnectionFragment(callback,inputSize);
}
项目:tensorflow-classifier-android    文件:CameraConnectionFragment.java   
private CameraConnectionFragment(
    final ConnectionCallback connectionCallback,final Size inputSize) {
  this.cameraConnectionCallback = connectionCallback;
  this.imageListener = imageListener;
  this.layout = layout;
  this.inputSize = inputSize;
}
项目:tensorflow-classifier-android    文件:CameraConnectionFragment.java   
public static CameraConnectionFragment newInstance(
    final ConnectionCallback callback,inputSize);
}
项目:Tensorflow_Andriod_With_Audio_Output    文件:CameraConnectionFragment.java   
private CameraConnectionFragment(
    final ConnectionCallback connectionCallback,final int inputSize) {
  this.cameraConnectionCallback = connectionCallback;
  this.imageListener = imageListener;
  this.layout = layout;
  this.inputSize = inputSize;
}
项目:SortingHatandroid    文件:CameraConnectionFragment.java   
private CameraConnectionFragment(final ConnectionCallback connectionCallback,final View.OnClickListener onClickListener,final int inputSize) {
  this.cameraConnectionCallback = connectionCallback;
  this.imageListener = imageListener;
  this.layout = layout;
  this.inputSize = inputSize;
  takeSnapshotListener = onClickListener;
}
项目:android-image-classification    文件:CameraConnectionFragment.java   
private CameraConnectionFragment(
    final ConnectionCallback connectionCallback,final Size inputSize) {
  this.cameraConnectionCallback = connectionCallback;
  this.imageListener = imageListener;
  this.layout = layout;
  this.inputSize = inputSize;
}
项目:android-image-classification    文件:CameraConnectionFragment.java   
public static CameraConnectionFragment newInstance(
    final ConnectionCallback callback,inputSize);
}
项目:ImageClassify    文件:CameraConnectionFragment.java   
private CameraConnectionFragment(
    final ConnectionCallback connectionCallback,final Size inputSize) {
  this.cameraConnectionCallback = connectionCallback;
  this.imageListener = imageListener;
  this.layout = layout;
  this.inputSize = inputSize;
}
项目:ImageClassify    文件:CameraConnectionFragment.java   
public static CameraConnectionFragment newInstance(
    final ConnectionCallback callback,inputSize);
}
项目:AI_Calorie_Counter_Demo    文件:CameraConnectionFragment.java   
private CameraConnectionFragment(
    final ConnectionCallback connectionCallback,final Size inputSize) {
  this.cameraConnectionCallback = connectionCallback;
  this.imageListener = imageListener;
  this.layout = layout;
  this.inputSize = inputSize;
}
项目:AI_Calorie_Counter_Demo    文件:CameraConnectionFragment.java   
public static CameraConnectionFragment newInstance(
    final ConnectionCallback callback,inputSize);
}
项目:Tensorflow_Andriod_With_Audio_Output    文件:CameraConnectionFragment.java   
public static CameraConnectionFragment newInstance(
    final ConnectionCallback callback,final int inputSize) {
  return new CameraConnectionFragment(callback,inputSize);
}
项目:SortingHatandroid    文件:CameraConnectionFragment.java   
public static CameraConnectionFragment newInstance(final ConnectionCallback callback,onClickListener,inputSize);
}

android.os.storage.OnObbStateChangeListener的实例源码

android.os.storage.OnObbStateChangeListener的实例源码

项目:Alite    文件:AliteFiles.java   
public static void performUnmount() {
  if (ObbExpansionsManager.getInstance() == null) {
    return;
  }
  AliteLog.d("Performing Unmount","Unmounting obb");
  ObbExpansionsManager.destroyInstance(new OnObbStatechangelistener() {
    public void onObbStateChange(String path,int state) {
       super.onObbStateChange(path,state);
       switch (state) {
         case MOUNTED: AliteLog.e("Obb UNmount callback","New OBB state is mounted! Fishy..."); break;
         case UNMOUNTED: AliteLog.d("Obb UNmount callback","OBB unmounted successfully."); break;
         case ERROR_INTERNAL: AliteLog.e("Obb UNmount callback","Internal Error"); break;
         case ERROR_Could_NOT_MOUNT: AliteLog.e("Obb UNmount callback","Could not mount"); break;
         case ERROR_Could_NOT_UNMOUNT: AliteLog.e("Obb UNmount callback","Could not unmount"); break;
         case ERROR_NOT_MOUNTED: AliteLog.e("Obb UNmount callback","OBB was not mounted"); break;
         case ERROR_ALREADY_MOUNTED: AliteLog.e("Obb UNmount callback","OBB already mounted"); break;
         case ERROR_PERMISSION_DENIED: AliteLog.e("Obb UNmount callback","Permission denied"); break;        
       }
    }
   });
}
项目:buildAPKsSamples    文件:ObbMountActivity.java   
@Override
public void onObbStateChange(String path,int state) {
    Log.d(TAG,"path=" + path + "; state=" + state);
    mStatus.setText(String.valueOf(state));
    if (state == OnObbStatechangelistener.MOUNTED) {
        mPath.setText(mSM.getMountedobbPath(mObbPath));
    } else {
        mPath.setText("");
    }
}
项目:Alite    文件:ObbExpansionsManager.java   
private void unmountMain(OnObbStatechangelistener listener) {
    sm.unmountObb(mainFile.getAbsolutePath(),true,listener);        
}
项目:Alite    文件:ObbExpansionsManager.java   
public static void destroyInstance(OnObbStatechangelistener listener) {
    instance.unmountMain(listener);
    instance = null;
}

android.widget.CalendarView.OnDateChangeListener的实例源码

android.widget.CalendarView.OnDateChangeListener的实例源码

项目:Zensuren    文件:kursbucheintragen.java   
protected void onCreate(Bundle savedInstanceState){
    super.onCreate(savedInstanceState);
    setContentView(R.layout.kursbucheintrag);
    vkurs = (TextView) findViewById(R.id.textViewkurs);
    vthema = (EditText) findViewById(R.id.editTextthema);
    vhausaufgabe = (EditText) findViewById(R.id.editTextha);
    vdoppelstunde = (Button) findViewById(R.id.buttonds);
    vspeichern = (Button) findViewById(R.id.buttonspeichern);
    vliste = (Button) findViewById(R.id.buttonliste);
    // vdatum = (DatePicker) findViewById(R.id.datePicker);
    Calendar myCal2 = new GregorianCalendar();
    pjahr = myCal2.get( Calendar.YEAR  );
    pmonat = myCal2.get( Calendar.MONTH );
    ptag = myCal2.get( Calendar.DATE  );
    CalendarView calendarView=(CalendarView) findViewById(R.id.calendarView);

    calendarView.setonDatechangelistener(new OnDatechangelistener() {
                                             @Override
                                             public void onSelectedDayChange(CalendarView view,int year,int month,int dayOfMonth) {
                                                 pjahr = year;
                                                 pmonat = month;
                                                 ptag = dayOfMonth;
                                                 // Toast.makeText(getApplicationContext(),""+dayOfMonth,0).show();// Todo Auto-generated method stub

                                             }
                                         });
    kursnummer = getIntent().getStringExtra("pkurs");
    kursname = getIntent().getStringExtra("pkursname");
    pdatum = getIntent().getStringExtra("pdatum");
    dm = new DataManipulator(this);

    if(!pdatum.equals("")){
        calendarView.setVisibility(View.INVISIBLE);
    }

    vkurs.setText("Kurs: " + kursname);
    vspeichern.setonClickListener(this);
    vdoppelstunde.setonClickListener(this);
}
项目:FCM    文件:PaginaCalendario.java   
@SuppressLint({"NewApi","ResourceAsColor"})
private void mostrarEventos(){
    calendario=(CalendarView) findViewById(R.id.calendario_eventos);
    calendario.setFirstDayOfWeek(Calendar.MONDAY); //Hacemos que el primer d�a de la semana sea Lunes
    calendario.setShowWeekNumber(false); //Ocultamos el n�mero de la semana

    //Obtenemos la resoluci�n de pantalla y cambiamos la altura del calendario si fuera necesario
    displayMetrics sizeScreen=new displayMetrics();
    getwindowManager().getDefaultdisplay().getMetrics(sizeScreen);
    int altoPantalla=sizeScreen.heightPixels;

    if(altoPantalla<800){ //Comprueba que la pantalla sea menor a 800p de altura
        //800 es el tama�o de la pantalla de desarrollo con margenes
        int altoCalendario=800-altoPantalla; //Obtenemos la diferencia del tama�o de la pantalla actual
        altoCalendario=640-altoCalendario; //Obtenemos la nueva altura del calendario

        //Hacemos que la altura cuadre con la resoluci�n de nuestro dispositivo
        LinearLayout.LayoutParams propiedades=(LinearLayout.LayoutParams) calendario.getLayoutParams();
        propiedades.height=altoCalendario;
        calendario.setLayoutParams(propiedades);
    }

    //Declaramos la variables que har�n de botones
    botonAgregarEntrenamiento=findViewById(R.id.boton_agregar_entrenamiento);
    botonVerEntrenamiento=findViewById(R.id.boton_ver_entrenamiento);
    botonEditarEntrenamiento=findViewById(R.id.boton_editar_entrenamiento);
    botonBorrarEntrenamiento=findViewById(R.id.boton_borrar_entrenamiento);
    botonAgregarPartido=findViewById(R.id.boton_agregar_partido);
    botonVerPartido=findViewById(R.id.boton_ver_partido);
    botonEditarPartido=findViewById(R.id.boton_editar_partido);
    botonBorrarPartido=findViewById(R.id.boton_borrar_partido);

    //Declaramos las imagenes que haran a funci�n de herramientas para los eventos
    agregarEventoEntrenamiento=(ImageView) findViewById(R.id.agregar_evento_entrenamiento);
    verEstadisticasEntrenamiento=(ImageView) findViewById(R.id.ver_estadisticas_entrenamiento);
    editarEventoEntrenamiento=(ImageView) findViewById(R.id.editar_evento_entrenamiento);
    borrarEventoEntrenamiento=(ImageView) findViewById(R.id.borrar_evento_entrenamiento);
    agregarEventoPartido=(ImageView) findViewById(R.id.agregar_evento_partido);
    verEstadisticasPartido=(ImageView) findViewById(R.id.ver_estadisticas_partido);
    editarEventoPartido=(ImageView) findViewById(R.id.editar_evento_partido);
    borrarEventoPartido=(ImageView) findViewById(R.id.borrar_evento_partido);

    //Registramos los controles de borrar como men�s contextuales
    registerForContextMenu(borrarEventoEntrenamiento);
    registerForContextMenu(borrarEventoPartido);

    fechaActual=getFechaActual(); //Fecha actual
    fechaSeleccionada=fechaActual; //Igualamos la fecha actual a la fecha seleccionada

    accionesMostrarEventos(fechaSeleccionada); //Imagenes desactivadas y activadas

    accionesHerramientasEventos(); //Acciones de las imagenes

    calendario.setonDatechangelistener(new OnDatechangelistener(){
        @Override
        public void onSelectedDayChange(CalendarView arg,int mes,int dia){
            mes=mes+1; //Le debemos sumar 1 al mes porque va solo del 0 al 11
            String month="0";
            if(mes<10){ //Si el mes es fechaInferior a 2 cifras,le agregamos un 0 delante para mantener el formato
                month=month.concat(String.valueOf(mes));
            }else{
                month=String.valueOf(mes);
            }

            String day="0";
            if(dia<10){
                day=day.concat(String.valueOf(dia));
            }else{
                day=String.valueOf(dia);
            }

            fechaSeleccionada=year+"-"+month+"-"+day;
            accionesMostrarEventos(fechaSeleccionada);
        }
    });
}
项目:panther    文件:Calendaractivity.java   
public void initializeCalendar() {
    calendar = (CalendarView) findViewById(R.id.calendar);

    // sets whether to show the week number.
    calendar.setShowWeekNumber(false);

    // sets the first day of week according to Calendar.
    // here we set Sunday as the first day of the Calendar
    calendar.setFirstDayOfWeek(1);

    //The background color for the selected week.
    calendar.setSelectedWeekBackgroundColor(getResources().getColor(R.color.light_yellow));

    //sets the color for the dates of an unfocused month.
    calendar.setUnfocusedMonthDateColor(getResources().getColor(R.color.transparent));

    //sets the color for the separator line between weeks.
    calendar.setWeekSeparatorLineColor(getResources().getColor(R.color.transparent));

    //sets the color for the vertical bar shown at the beginning and at the end of the selected date.
    calendar.setSelectedDateVerticalBar(R.color.light_yellow);
    calendar.setClickable(true);
    /*
    calendar.setonClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            Log.d("Info","CLICKCKCKC");
            Date date = new Date(calendar.getDate());
            java.util.Calendar cal = java.util.Calendar.getInstance();
            cal.setTime(date);
            int day = cal.get(java.util.Calendar.DAY_OF_MONTH);
            int month = cal.get(java.util.Calendar.MONTH);
            int year = cal.get(java.util.Calendar.YEAR);
            Toast.makeText(getApplicationContext(),day + "/" + month + "/" + year,Toast.LENGTH_LONG).show();
            Intent intent = new Intent("com.thunderpanther.panther.DayViewActivity");
            if(taskSelected == true) {
                intent.putExtra("id",selectedTask.id);
                intent.putExtra("name",selectedTask.name);
                intent.putExtra("depth",selectedTask.depth);
                Log.d("cal","taskSelected: " + selectedTask.name);
                selectedTask = null;
                taskSelected = false;

            } else {
                intent.putExtra("id",-1);
            }
            intent.putExtra("year",year);
            intent.putExtra("month",month);
            intent.putExtra("day",day);

            startActivity(intent);
        }
    });
    */

    //sets the listener to be notified upon selected date change.
    calendar.setonDatechangelistener(new OnDatechangelistener() {
        //show the selected date as a toast
        @Override
        public void onSelectedDayChange(CalendarView view,int day) {
            Toast.makeText(getApplicationContext(),day);

            startActivity(intent);
        }
    });
}

android.widget.CompoundButton.OnCheckedChangeListener的实例源码

android.widget.CompoundButton.OnCheckedChangeListener的实例源码

项目:B4A_ViewsEx    文件:SwitchWrapper.java   
@Hide
@Override
public void _initialize(final BA ba,Object activityClass,String EventName) {
    final Switch _switch = new Switch(ba.context);
    final String eventName = EventName.toLowerCase(BA.cul);
    setobject(_switch);
    innerInitialize(ba,eventName,true);
    if (ba.subExists(eventName + "_checkedchange")) {
        getobject().setonCheckedchangelistener(new OnCheckedchangelistener() {
            @Override
            public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
                ba.raiseEventFromUI(_switch,eventName + "_checkedchange",isChecked);
            }

        });
    }
}
项目:letv    文件:LoginActivity.java   
private void beautyView() {
    beautyEditText(this.mInputAccount,L10NString.getString("umgr_please_input_username"),this.mAccountTextWatcher);
    beautyCleanButton(this.mClearInputAccount,this);
    this.mInputAccountLayout.setonClickListener(this);
    beautyCleanButton(this.mClearInputPassword,this);
    this.mInputPassword.setonClickListener(this);
    beautyEditText(this.mInputPassword,L10NString.getString("umgr_please_input_password"),this.mPasswordTextWatcher);
    beautyColorTextView(this.mRegister,"#007dc4",false,L10NString.getString("umgr_whether_register_ornot"),this);
    beautyColorTextView(this.mFindpwd,L10NString.getString("umgr_whether_forget_password"),this);
    beautyColorTextView(this.mSwitchAccount,L10NString.getString("umgr_third_login_qihoo_tip"),this);
    beautyButtonGreen(this.mLogin,L10NString.getString("umgr_login"),this);
    beautyTextView(this.mAgreeClause1,L10NString.getString("umgr_login_agree_clause_1"));
    beautyTextView(this.mAgreeClauseUser,L10NString.getString("umgr_agree_clause_2_user"));
    beautyColorTextView(this.mAgreement,"#0099e5",true,L10NString.getString("umgr_agree_clause_2_agreement"),this);
    beautyTextView(this.mAnd,L10NString.getString("umgr_agree_clause_2_and"));
    beautyColorTextView(this.mPrivacy,L10NString.getString("umgr_agree_clause_2_privacy"),this);
    beautyCheckButton(this.mShowPwd,new OnCheckedchangelistener() {
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
            LoginActivity.this.mInputPassword.setTransformationMethod(LoginActivity.this.mShowPwd.isChecked() ? HideReturnsTransformationMethod.getInstance() : PasswordTransformationMethod.getInstance());
        }
    });
    loadPrivateConfig();
}
项目:AllHuaji    文件:MainActivity.java   
@SuppressLint("NewApi")
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_demo);
    setting = new Settings(this);
    s = (Switch) findViewById(R.id.switch1);
    s.setChecked(setting.isstarted());
    s.setonCheckedchangelistener(new OnCheckedchangelistener() {

        @Override
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
            // Todo 自动生成的方法存根
            setting.setStarted(isChecked);
        }
    });

}
项目:CustomAndroidOnesheeld    文件:ToggleButtonFragment.java   
@Override
public void doOnViewCreated(View v,@Nullable Bundle savedInstanceState) {
    toggleButtonButton = (OnesheeldToggleButton) v
            .findViewById(R.id.toggle_button_shield_button_toggle_button);
    if (getApplication().getRunningShields().get(
            getControllerTag()) == null) {
        getApplication().getRunningShields().put(getControllerTag(),new ToggleButtonShield(activity,getControllerTag()));
    }
    toggleButtonButton
            .setonCheckedchangelistener(new OnCheckedchangelistener() {

                @Override
                public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
                    // Todo Auto-generated method stub
                    ((ToggleButtonShield) getApplication()
                            .getRunningShields().get(getControllerTag()))
                            .setButton(isChecked);

                }
            });
    if (getApplication().getRunningShields().get(
            getControllerTag()) != null)
        toggleButtonButton.setEnabled(true);
}
项目:boohee_v5.6    文件:AddCameraRecordActivity.java   
private void addListener() {
    this.toggle_bingo.setonCheckedchangelistener(new OnCheckedchangelistener() {
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
            if (isChecked) {
                AddCameraRecordActivity.this.mInputCalory = AddCameraRecordActivity.this
                        .et_calory.getText().toString();
                AddCameraRecordActivity.this.et_calory.getText().clear();
                AddCameraRecordActivity.this.et_calory.setHint("请等待顾问为你估算");
                AddCameraRecordActivity.this.et_calory.setEnabled(false);
                return;
            }
            if (!TextUtils.isEmpty(AddCameraRecordActivity.this.mInputCalory)) {
                AddCameraRecordActivity.this.et_calory.setText(AddCameraRecordActivity.this
                        .mInputCalory);
                Selection.setSelection(AddCameraRecordActivity.this.et_calory.getText(),AddCameraRecordActivity.this.et_calory.getText().length());
            }
            AddCameraRecordActivity.this.et_calory.setHint("所含的热量(可不填)");
            AddCameraRecordActivity.this.et_calory.setEnabled(true);
        }
    });
}
项目:boohee_v5.6    文件:DownloadManageActivity.java   
private void initViews() {
    this.recyclerView.setLayoutManager(new linearlayoutmanager(this));
    List<DownloadRecord> recordList = DownloadHelper.getInstance().getRecordsList();
    this.mAdapter = new DownloadAdapter(this,recordList);
    this.recyclerView.setAdapter(this.mAdapter);
    if (recordList.size() == 0) {
        showEmpty();
        return;
    }
    this.tvDelete.setonClickListener(new OnClickListener() {
        public void onClick(View v) {
            DownloadManageActivity.this.showDeleteDialog();
        }
    });
    this.cbSelectAll.setonCheckedchangelistener(new OnCheckedchangelistener() {
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
            if (isChecked) {
                DownloadManageActivity.this.mAdapter.selectAll();
            } else if (!DownloadAdapter.CANCEL_SELECT_ALL.equals(buttonView.getTag())) {
                DownloadManageActivity.this.mAdapter.selectNone();
            }
            buttonView.setTag(null);
        }
    });
}
项目:GCSApp    文件:NewGroupActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.em_activity_new_group);
    groupNameEditText = (EditText) findViewById(R.id.edit_group_name);
    introductionEditText = (EditText) findViewById(R.id.edit_group_introduction);
    publibCheckBox = (CheckBox) findViewById(R.id.cb_public);
    memberCheckBox = (CheckBox) findViewById(R.id.cb_member_inviter);
    secondTextView = (TextView) findViewById(R.id.second_desc);

    publibCheckBox.setonCheckedchangelistener(new OnCheckedchangelistener() {

        @Override
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
            if (isChecked) {
                secondTextView.setText(R.string.join_need_owner_approval);
            } else {
                secondTextView.setText(R.string.Open_group_members_invited);
            }
        }
    });
}
项目:Harmony-music-player    文件:EqualizerActivity.java   
private void bindSwitchToEqualizer() {
    if (!mSwitchBound && mSwitchButton != null) {

        mSwitchButton.setChecked(AudioEffects.areAudioEffectsEnabled());
        mSwitchButton
                .setonCheckedchangelistener(new OnCheckedchangelistener() {

                    @Override
                    public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
                        AudioEffects.setAudioEffectsEnabled(isChecked);

                    }
                });
        mSwitchBound = true;
    }
}
项目:TAG    文件:NewGroupActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_new_group);
    groupNameEditText = (EditText) findViewById(R.id.edit_group_name);
    introductionEditText = (EditText) findViewById(R.id.edit_group_introduction);
    checkBox = (CheckBox) findViewById(R.id.cb_public);
    memberCheckBox = (CheckBox) findViewById(R.id.cb_member_inviter);
    openInviteContainer = (LinearLayout) findViewById(R.id.ll_open_invite);

    checkBox.setonCheckedchangelistener(new OnCheckedchangelistener() {

        @Override
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
            if(isChecked){
                openInviteContainer.setVisibility(View.INVISIBLE);
            }else{
                openInviteContainer.setVisibility(View.VISIBLE);
            }
        }
    });
}
项目:GOpenSource_AppKit_Android_AS    文件:GosDeviceResetActivity.java   
private void initEvent() {
    btnNext.setonClickListener(this);
    tvSelect.setonClickListener(this);
    btnNext.setClickable(false);
    btnNext.setBackgroundResource(R.drawable.btn_next_shape_gray);

    cbSelect.setonCheckedchangelistener(new OnCheckedchangelistener() {

        @Override
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
            if (isChecked) {
                btnNext.setBackgroundDrawable(GosDeploy.setButtonBackgroundColor());
                btnNext.setClickable(true);
            } else {
                btnNext.setBackgroundResource(R.drawable.btn_next_shape_gray);
                btnNext.setClickable(false);
            }

        }
    });
}
项目:GOpenSource_AppKit_Android_AS    文件:GosAirlinkChooseDeviceWorkWiFiActivity.java   
private void ininEvent() {
    btnNext.setonClickListener(this);
    imgWiFiList.setonClickListener(this);
    llChooseMode.setonClickListener(this);

    cbLaws.setonCheckedchangelistener(new OnCheckedchangelistener() {
        @Override
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
            String psw = etPsw.getText().toString();

            if (isChecked) {
                etPsw.setInputType(0x90);
            } else {
                etPsw.setInputType(0x81);
            }
            etPsw.setSelection(psw.length());
        }
    });
}
项目:GOpenSource_AppKit_Android_AS    文件:GosCheckDeviceWorkWiFiActivity.java   
private void ininEvent() {
    btnNext.setonClickListener(this);
    imgWiFiList.setonClickListener(this);

    cbLaws.setonCheckedchangelistener(new OnCheckedchangelistener() {
        @Override
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
            String psw = etPsw.getText().toString();

            if (isChecked) {
                etPsw.setInputType(0x90);
            } else {
                etPsw.setInputType(0x81);
            }
            etPsw.setSelection(psw.length());
        }
    });
    cbLaws.setChecked(true);
}
项目:GOpenSource_AppKit_Android_AS    文件:GosChooseDeviceWorkWiFiActivity.java   
private void ininEvent() {
    llNext.setonClickListener(this);
    imgWiFiList.setonClickListener(this);

    cbLaws.setonCheckedchangelistener(new OnCheckedchangelistener() {
        @Override
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
            String psw = etPsw.getText().toString();

            if (isChecked) {
                etPsw.setInputType(0x90);
            } else {
                etPsw.setInputType(0x81);
            }
            etPsw.setSelection(psw.length());
        }
    });
}
项目:GOpenSource_AppKit_Android_AS    文件:GosAirlinkReadyActivity.java   
private void initEvent() {
    btnNext.setonClickListener(this);
    tvSelect.setonClickListener(this);
    btnNext.setClickable(false);
    btnNext.setBackgroundResource(R.drawable.btn_next_shape_gray);

    cbSelect.setonCheckedchangelistener(new OnCheckedchangelistener() {

        @Override
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
            if (isChecked) {
                btnNext.setBackgroundDrawable(GosDeploy.setButtonBackgroundColor());
                btnNext.setClickable(true);
            } else {
                btnNext.setBackgroundResource(R.drawable.btn_next_shape_gray);
                btnNext.setClickable(false);
            }

        }
    });
}
项目:GOpenSource_AppKit_Android_AS    文件:GosDeviceReadyActivity.java   
private void initEvent() {
    tvnoredLight.setonClickListener(this);
    tvSelect.setonClickListener(this);
    btnNext.setonClickListener(this);
    btnNext.setClickable(false);
    btnNext.setBackgroundResource(R.drawable.btn_next_shape_gray);

    cbSelect.setonCheckedchangelistener(new OnCheckedchangelistener() {

        @Override
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
            if (isChecked) {
                btnNext.setBackgroundDrawable(GosDeploy.setButtonBackgroundColor());;
                btnNext.setClickable(true);
            } else {
                btnNext.setBackgroundResource(R.drawable.btn_next_shape_gray);
                btnNext.setClickable(false);
            }

        }
    });
}
项目:GOpenSource_AppKit_Android_AS    文件:GosUserLoginActivity.java   
private void initEvent() {
    btnLogin.setonClickListener(this);
    tvRegister.setonClickListener(this);
    tvForget.setonClickListener(this);
    tvPass.setonClickListener(this);

    llQQ.setonClickListener(this);
    llWechat.setonClickListener(this);

    cbLaws.setonCheckedchangelistener(new OnCheckedchangelistener() {

        @Override
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
            String psw = etPsw.getText().toString();

            if (isChecked) {
                etPsw.setInputType(0x90);
            } else {
                etPsw.setInputType(0x81);
            }
            etPsw.setSelection(psw.length());
        }
    });
}
项目:Gourmet    文件:SubscriptionsAdapter.java   
@Override
public void onBindViewHolder(final SubscriptionViewHolder holder,int position) {
    final Subscription subscription = subscriptions.get(position);

    if (!TextUtils.isEmpty(subscription.getRestaurant().getPhoto())) {
        Picasso.with(context).load(subscription.getRestaurant().getPhoto()).into(holder.imageView);
    }

    holder.tvTitle.setText(subscription.getRestaurant().getName());

    holder.subscribe.setChecked(subscription.isSubscribed());

    holder.subscribe.setonCheckedchangelistener(new OnCheckedchangelistener() {
        @Override
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
            subscription.setSubscribed(isChecked);
        }
    });
}
项目:GizOpenSource_AppKit_Android    文件:GosDeviceResetActivity.java   
private void initEvent() {
    btnNext.setonClickListener(this);
    tvSelect.setonClickListener(this);
    btnNext.setClickable(false);
    btnNext.setBackgroundResource(R.drawable.btn_next_shape_gray);

    cbSelect.setonCheckedchangelistener(new OnCheckedchangelistener() {

        @Override
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
            if (isChecked) {
                btnNext.setBackgroundDrawable(GosDeploy.setButtonBackgroundColor());
                btnNext.setClickable(true);
            } else {
                btnNext.setBackgroundResource(R.drawable.btn_next_shape_gray);
                btnNext.setClickable(false);
            }

        }
    });
}
项目:GizOpenSource_AppKit_Android    文件:GosAirlinkChooseDeviceWorkWiFiActivity.java   
private void ininEvent() {
    btnNext.setonClickListener(this);
    imgWiFiList.setonClickListener(this);
    llChooseMode.setonClickListener(this);

    cbLaws.setonCheckedchangelistener(new OnCheckedchangelistener() {
        @Override
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
            String psw = etPsw.getText().toString();

            if (isChecked) {
                etPsw.setInputType(0x90);
            } else {
                etPsw.setInputType(0x81);
            }
            etPsw.setSelection(psw.length());
        }
    });
}
项目:GizOpenSource_AppKit_Android    文件:GosCheckDeviceWorkWiFiActivity.java   
private void ininEvent() {
    btnNext.setonClickListener(this);
    imgWiFiList.setonClickListener(this);

    cbLaws.setonCheckedchangelistener(new OnCheckedchangelistener() {
        @Override
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
            String psw = etPsw.getText().toString();

            if (isChecked) {
                etPsw.setInputType(0x90);
            } else {
                etPsw.setInputType(0x81);
            }
            etPsw.setSelection(psw.length());
        }
    });
    cbLaws.setChecked(true);
}
项目:GizOpenSource_AppKit_Android    文件:GosChooseDeviceWorkWiFiActivity.java   
private void ininEvent() {
    llNext.setonClickListener(this);
    imgWiFiList.setonClickListener(this);

    cbLaws.setonCheckedchangelistener(new OnCheckedchangelistener() {
        @Override
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
            String psw = etPsw.getText().toString();

            if (isChecked) {
                etPsw.setInputType(0x90);
            } else {
                etPsw.setInputType(0x81);
            }
            etPsw.setSelection(psw.length());
        }
    });
}
项目:GizOpenSource_AppKit_Android    文件:GosAirlinkReadyActivity.java   
private void initEvent() {
    btnNext.setonClickListener(this);
    tvSelect.setonClickListener(this);
    btnNext.setClickable(false);
    btnNext.setBackgroundResource(R.drawable.btn_next_shape_gray);

    cbSelect.setonCheckedchangelistener(new OnCheckedchangelistener() {

        @Override
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
            if (isChecked) {
                btnNext.setBackgroundDrawable(GosDeploy.setButtonBackgroundColor());
                btnNext.setClickable(true);
            } else {
                btnNext.setBackgroundResource(R.drawable.btn_next_shape_gray);
                btnNext.setClickable(false);
            }

        }
    });
}
项目:GizOpenSource_AppKit_Android    文件:GosDeviceReadyActivity.java   
private void initEvent() {
    tvnoredLight.setonClickListener(this);
    tvSelect.setonClickListener(this);
    btnNext.setonClickListener(this);
    btnNext.setClickable(false);
    btnNext.setBackgroundResource(R.drawable.btn_next_shape_gray);

    cbSelect.setonCheckedchangelistener(new OnCheckedchangelistener() {

        @Override
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
            if (isChecked) {
                btnNext.setBackgroundDrawable(GosDeploy.setButtonBackgroundColor());;
                btnNext.setClickable(true);
            } else {
                btnNext.setBackgroundResource(R.drawable.btn_next_shape_gray);
                btnNext.setClickable(false);
            }

        }
    });
}
项目:GizOpenSource_AppKit_Android    文件:GosUserLoginActivity.java   
private void initEvent() {
    btnLogin.setonClickListener(this);
    tvRegister.setonClickListener(this);
    tvForget.setonClickListener(this);
    tvPass.setonClickListener(this);

    llQQ.setonClickListener(this);
    llWechat.setonClickListener(this);

    cbLaws.setonCheckedchangelistener(new OnCheckedchangelistener() {

        @Override
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
            String psw = etPsw.getText().toString();

            if (isChecked) {
                etPsw.setInputType(0x90);
            } else {
                etPsw.setInputType(0x81);
            }
            etPsw.setSelection(psw.length());
        }
    });
}
项目:EntboostIM    文件:HuaweiResolveErrorActivity.java   
private void executeResolveError() {
    Intent intent = getIntent();

    //获取CheckBox实例
    CheckBox cb = (CheckBox)this.findViewById(R.id.checkBox1);
    //绑定监听器
    cb.setonCheckedchangelistener(new OnCheckedchangelistener() {
           @Override
           public void onCheckedChanged(CompoundButton arg0,boolean checkedState) {
            SharedPreferences preferences = getSharedPreferences("first",Context.MODE_PRIVATE);
            SharedPreferences.Editor editor = preferences.edit();
            editor.putBoolean(ENABLE_SHOW_HUAWEI_RESOLVE_ERROR_VIEW,!checkedState);
            editor.commit();
            Log4jLog.d(LONG_TAG,"set enable_show_huawei_resolve_error_view:" + !checkedState);
           }
    });

    int errorCode = intent.getIntExtra(INTENT_ERROR_CODE,-1);
       HuaweiApiAvailability availability = HuaweiApiAvailability.getInstance();

       if (availability.isUserResolvableError(errorCode)) {
           availability.resolveError(this,errorCode,REQUEST_RESOLVE_ERROR,this);
       }
}
项目:ChatDemoUI3.0    文件:NewGroupActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.em_activity_new_group);
    groupNameEditText = (EditText) findViewById(R.id.edit_group_name);
    introductionEditText = (EditText) findViewById(R.id.edit_group_introduction);
    publibCheckBox = (CheckBox) findViewById(R.id.cb_public);
    memberCheckBox = (CheckBox) findViewById(R.id.cb_member_inviter);
    secondTextView = (TextView) findViewById(R.id.second_desc);

    publibCheckBox.setonCheckedchangelistener(new OnCheckedchangelistener() {

        @Override
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
            if(isChecked){
                secondTextView.setText(R.string.join_need_owner_approval);
            }else{
                   secondTextView.setText(R.string.Open_group_members_invited);
            }
        }
    });
}
项目:ItHome    文件:LaPinShopCar.java   
private void init() {
    listView=(ListView) findViewById(R.id.shopcar_listview);
    totalPrice=(TextView) findViewById(R.id.shopcar_allprice);
    payall=(CheckBox) findViewById(R.id.shopcar_payall);
    topay=(TextView) findViewById(R.id.shopcar_zhifu);
    topay.setonClickListener(this);
    payall.setonCheckedchangelistener(new OnCheckedchangelistener() {

        @Override
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
            if(isChecked){
                adapter.initCheckBox(true);
                adapter.notifyDataSetChanged();
            }

        }
    });
}
项目:intellij-ce-playground    文件:BooleanEditor.java   
public Runnable bindEditor(View v,final EditableItem item,final Runnable afterChange) {
    final ViewStub booleanEditorStub = (ViewStub) v.findViewById(R.id.boolean_editor_stub);
    booleanEditorStub.setLayoutResource(R.layout.boolean_editor);
    final Switch booleanEditor = (Switch) booleanEditorStub.inflate();
    Runnable updateSwitch = new Runnable() {
        public void run() {
            booleanEditor.setChecked(item.hasValue() && item.getValueBool());
        }};
    booleanEditor.setVisibility(View.VISIBLE);
    updateSwitch.run();
    booleanEditor.setonCheckedchangelistener(new OnCheckedchangelistener(){
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
            item.setValue(isChecked);
            afterChange.run();
        }});
    return updateSwitch;
}
项目:umeng_community_android    文件:PushSettingFragment.java   
@Override
protected void initWidgets() {
    int switchButtonResId = ResFinder.getId(
            "umeng_common_switch_button");
    mSwitchButton = (SwitchButton) mRootView
            .findViewById(switchButtonResId);
    mSwitchButton.setChecked(mSDKConfig.isPushEnable(getActivity()));
    mSwitchButton.setonCheckedchangelistener(new OnCheckedchangelistener() {

        @Override
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
            // 保存配置
            CommConfig.getConfig().setSDKPushable(getActivity(),isChecked);
        }
    });
}
项目:AndroidGeek    文件:PushSettingFragment.java   
@Override
protected void initWidgets() {
    int switchButtonResId = ResFinder.getId(
            "umeng_common_switch_button");
    mSwitchButton = (SwitchButton) mRootView
            .findViewById(switchButtonResId);
    mSwitchButton.setChecked(mSDKConfig.isPushEnable(getActivity()));
    mSwitchButton.setonCheckedchangelistener(new OnCheckedchangelistener() {

        @Override
        public void onCheckedChanged(CompoundButton buttonView,isChecked);
        }
    });
}
项目:sdkdemoapp3.0_android    文件:NewGroupActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.em_activity_new_group);
    groupNameEditText = (EditText) findViewById(R.id.edit_group_name);
    introductionEditText = (EditText) findViewById(R.id.edit_group_introduction);
    checkBox = (CheckBox) findViewById(R.id.cb_public);
    memberCheckBox = (CheckBox) findViewById(R.id.cb_member_inviter);
    openInviteContainer = (LinearLayout) findViewById(R.id.ll_open_invite);

    checkBox.setonCheckedchangelistener(new OnCheckedchangelistener() {

        @Override
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
            if(isChecked){
                openInviteContainer.setVisibility(View.INVISIBLE);
            }else{
                openInviteContainer.setVisibility(View.VISIBLE);
            }
        }
    });
}
项目:OSBuild    文件:MainActivity.java   
/**
 * Dialog: What's OSBuild?
 * Show description about OSBuild.
 */
@TargetApi(11)
private void appDescDialog()
{
    ViewGroup viewGroup = (ViewGroup) getLayoutInflater().inflate(R.layout.dialog_text_ask,null);
    ((MyTextView)viewGroup.findViewById(R.id.mtv_desc)).setText(R.string.dia_app_desc);

    ((CheckBox)viewGroup.findViewById(R.id.cb_not_show))
        .setonCheckedchangelistener(new OnCheckedchangelistener()
    {
        @Override
        public void onCheckedChanged(CompoundButton p1,boolean p2)
        {
            sharedPreferences.edit()
                .putBoolean("not_show_about",p2).commit();
        }
    });

    AlertDialog alertDialog = (C.SDK >= 21 ? (new AlertDialog.Builder(this,R.style.AlertDialogStyle)) : (new AlertDialog.Builder(this)))
        .setTitle(R.string.dia_title_about)
        .setView(viewGroup)
        .setPositiveButton(R.string.dia_pos_ok,null)
        .create();
    alertDialog.show();
}
项目:Gizwits-SmartBuld_Android    文件:GosDeviceResetActivity.java   
private void initEvent() {
    btnNext.setonClickListener(this);
    tvSelect.setonClickListener(this);
    btnNext.setClickable(false);
    btnNext.setBackgroundResource(R.drawable.button_shape_gray);

    cbSelect.setonCheckedchangelistener(new OnCheckedchangelistener() {

        @Override
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
            if (isChecked) {
                btnNext.setBackgroundDrawable(GosDeploy.setButtonBackgroundColor());
                btnNext.setClickable(true);
            } else {
                btnNext.setBackgroundResource(R.drawable.button_shape_gray);
                btnNext.setClickable(false);
            }

        }
    });
}
项目:Gizwits-SmartBuld_Android    文件:GosAirlinkChooseDeviceWorkWiFiActivity.java   
private void ininEvent() {
    btnNext.setonClickListener(this);
    imgWiFiList.setonClickListener(this);
    llChooseMode.setonClickListener(this);

    cbLaws.setonCheckedchangelistener(new OnCheckedchangelistener() {
        @Override
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
            String psw = etPsw.getText().toString();

            if (isChecked) {
                etPsw.setInputType(0x90);
            } else {
                etPsw.setInputType(0x81);
            }
            etPsw.setSelection(psw.length());
        }
    });
}
项目:Gizwits-SmartBuld_Android    文件:GosCheckDeviceWorkWiFiActivity.java   
private void ininEvent() {
    btnNext.setonClickListener(this);
    imgWiFiList.setonClickListener(this);

    cbLaws.setonCheckedchangelistener(new OnCheckedchangelistener() {
        @Override
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
            String psw = etPsw.getText().toString();

            if (isChecked) {
                etPsw.setInputType(0x90);
            } else {
                etPsw.setInputType(0x81);
            }
            etPsw.setSelection(psw.length());
        }
    });
    cbLaws.setChecked(true);
}
项目:Gizwits-SmartBuld_Android    文件:GosAirlinkReadyActivity.java   
private void initEvent() {
    btnNext.setonClickListener(this);
    tvSelect.setonClickListener(this);
    btnNext.setClickable(false);
    btnNext.setBackgroundResource(R.drawable.button_shape_gray);

    cbSelect.setonCheckedchangelistener(new OnCheckedchangelistener() {

        @Override
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
            if (isChecked) {
                btnNext.setBackgroundDrawable(GosDeploy.setButtonBackgroundColor());
                btnNext.setClickable(true);
            } else {
                btnNext.setBackgroundResource(R.drawable.button_shape_gray);
                btnNext.setClickable(false);
            }

        }
    });
}
项目:Gizwits-SmartBuld_Android    文件:GosDeviceReadyActivity.java   
private void initEvent() {
    tvnoredLight.setonClickListener(this);
    tvSelect.setonClickListener(this);
    btnNext.setonClickListener(this);
    btnNext.setClickable(false);
    btnNext.setBackgroundResource(R.drawable.button_shape_gray);

    cbSelect.setonCheckedchangelistener(new OnCheckedchangelistener() {

        @Override
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
            if (isChecked) {
                btnNext.setBackgroundDrawable(GosDeploy.setButtonBackgroundColor());;
                btnNext.setClickable(true);
            } else {
                btnNext.setBackgroundResource(R.drawable.button_shape_gray);
                btnNext.setClickable(false);
            }

        }
    });
}
项目:Gizwits-SmartBuld_Android    文件:GosUserLoginActivity.java   
private void initEvent() {
    btnLogin.setonClickListener(this);
    tvRegister.setonClickListener(this);
    tvForget.setonClickListener(this);
    tvPass.setonClickListener(this);

    llQQ.setonClickListener(this);
    llWechat.setonClickListener(this);

    cbLaws.setonCheckedchangelistener(new OnCheckedchangelistener() {

        @Override
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
            String psw = etPsw.getText().toString();

            if (isChecked) {
                etPsw.setInputType(0x90);
            } else {
                etPsw.setInputType(0x81);
            }
            etPsw.setSelection(psw.length());
        }
    });
}
项目:easyLight    文件:EasyLight.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    mTorch = (ToggleButton) findViewById(R.id.toggleLight);
    mTorch.setonCheckedchangelistener(new OnCheckedchangelistener() { 
        @Override
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked)
        {    
            try{
                if(isChecked){
                    mService.activatetorch();
                }else{
                    mService.deactivatetorch();
                }
            }catch (Exception e) {
                e.printstacktrace();
            }
        }
    });
    Toast.makeText(getApplicationContext(),R.string.hello_msg,Toast.LENGTH_SHORT).show();
}
项目:PdDroidPublisher    文件:MidiConfigDialog.java   
private View createOutputWidget(MidiDevice midiDevice,final Midioutput midioutput) {
    LinearLayout view = new LinearLayout(getContext());

    TextView tv = new TextView(getContext());
    tv.setText(new MidiPortAdapter(midiDevice,midioutput).toString());

    CheckBox cb = new CheckBox(getContext());
    cb.setChecked(midiManager.isOpened(midioutput));
    cb.setonCheckedchangelistener(new OnCheckedchangelistener() {
        @Override
        public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
            if (isChecked) {
                midiManager.open(midioutput);
            } else {
                midiManager.close(midioutput);
            }
        }
    });

    view.addView(cb);
    view.addView(tv);

    return view;
}

今天关于java.beans.VetoableChangeListener的实例源码java.beans.introspection的介绍到此结束,谢谢您的阅读,有关android.media.ImageReader.OnImageAvailableListener的实例源码、android.os.storage.OnObbStateChangeListener的实例源码、android.widget.CalendarView.OnDateChangeListener的实例源码、android.widget.CompoundButton.OnCheckedChangeListener的实例源码等更多相关知识的信息可以在本站进行查询。

本文标签: