All Downloads are FREE. Search and download functionalities are using the official Maven repository.

system.windows.navigation.NavigationService Maven / Gradle / Ivy

/*
 *  MIT License
 *
 *  Copyright (c) 2024 MASES s.r.l.
 *
 *  Permission is hereby granted, free of charge, to any person obtaining a copy
 *  of this software and associated documentation files (the "Software"), to deal
 *  in the Software without restriction, including without limitation the rights
 *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 *  copies of the Software, and to permit persons to whom the Software is
 *  furnished to do so, subject to the following conditions:
 *
 *  The above copyright notice and this permission notice shall be included in all
 *  copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 *  SOFTWARE.
 */

/**************************************************************************************
 * 
 *      This code was generated from a template using JCOReflector v. 1.15.0.0
 * 
 *      Manual changes to this file may cause unexpected behavior in your application.
 *      Manual changes to this file will be overwritten if the code is regenerated.
 * 
 *************************************************************************************/

package system.windows.navigation;

import org.mases.jcobridge.*;
import org.mases.jcobridge.netreflection.*;
import java.util.ArrayList;

// Import section
import system.Uri;
import system.windows.navigation.JournalEntry;
import system.windows.navigation.NavigationService;
import system.windows.DependencyObject;
import system.windows.navigation.CustomContentState;
import system.windows.navigation.FragmentNavigationEventHandler;
import system.windows.navigation.LoadCompletedEventHandler;
import system.windows.navigation.NavigatedEventHandler;
import system.windows.navigation.NavigatingCancelEventHandler;
import system.windows.navigation.NavigationFailedEventHandler;
import system.windows.navigation.NavigationProgressEventHandler;
import system.windows.navigation.NavigationStoppedEventHandler;


/**
 * The base .NET class managing System.Windows.Navigation.NavigationService, PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
 * 

* * .NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.Windows.Navigation.NavigationService *

* * Powered by JCOBridge: more info at https://www.jcobridge.com * * @author MASES s.r.l https://masesgroup.com * @version 1.15.0.0 */ public class NavigationService extends NetObject { /** * Fully assembly qualified name: PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 */ public static final String assemblyFullName = "PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"; /** * Assembly name: PresentationFramework */ public static final String assemblyShortName = "PresentationFramework"; /** * Qualified class name: System.Windows.Navigation.NavigationService */ public static final String className = "System.Windows.Navigation.NavigationService"; static JCOBridge bridge = JCOBridgeInstance.getInstance(assemblyFullName); /** * The type managed from JCOBridge. See {@link JCType} */ public static JCType classType = createType(); static JCEnum enumInstance = null; JCObject classInstance = null; static JCType createType() { try { String classToCreate = className + ", " + (JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); if (JCOReflector.getDebug()) JCOReflector.writeLog("Creating %s", classToCreate); JCType typeCreated = bridge.GetType(classToCreate); if (JCOReflector.getDebug()) JCOReflector.writeLog("Created: %s", (typeCreated != null) ? typeCreated.toString() : "Returned null value"); return typeCreated; } catch (JCException e) { JCOReflector.writeLog(e); return null; } } void addReference(String ref) throws Throwable { try { bridge.AddReference(ref); } catch (JCNativeException jcne) { throw translateException(jcne); } } /** * Internal constructor. Use with caution */ public NavigationService(java.lang.Object instance) throws Throwable { super(instance); if (instance instanceof JCObject) { classInstance = (JCObject) instance; } else throw new Exception("Cannot manage object, it is not a JCObject"); } public String getJCOAssemblyName() { return assemblyFullName; } public String getJCOClassName() { return className; } public String getJCOObjectName() { return className + ", " + (JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); } public java.lang.Object getJCOInstance() { return classInstance; } public void setJCOInstance(JCObject instance) { classInstance = instance; super.setJCOInstance(classInstance); } public JCType getJCOType() { return classType; } /** * Try to cast the {@link IJCOBridgeReflected} instance into {@link NavigationService}, a cast assert is made to check if types are compatible. * @param from {@link IJCOBridgeReflected} instance to be casted * @return {@link NavigationService} instance * @throws java.lang.Throwable in case of error during cast operation */ public static NavigationService cast(IJCOBridgeReflected from) throws Throwable { NetType.AssertCast(classType, from); return new NavigationService(from.getJCOInstance()); } // Constructors section public NavigationService() throws Throwable { } // Methods section public boolean Navigate(NetObject root) throws Throwable, system.ArgumentNullException, system.resources.MissingManifestResourceException, system.InvalidOperationException, system.ArgumentException, system.InvalidCastException, system.NotSupportedException, system.MissingMethodException, system.security.SecurityException, system.ArgumentOutOfRangeException, system.ObjectDisposedException, system.IndexOutOfRangeException, system.UnauthorizedAccessException, system.io.IOException, system.UriFormatException, system.RankException, system.NotImplementedException, system.SystemException, system.deployment.application.InvalidDeploymentException, system.MemberAccessException, system.MulticastNotSupportedException, system.componentmodel.Win32Exception, system.OverflowException, system.componentmodel.InvalidEnumArgumentException, system.TimeoutException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Invoke("Navigate", root == null ? null : root.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public boolean Navigate(NetObject root, NetObject navigationState) throws Throwable, system.ArgumentNullException, system.resources.MissingManifestResourceException, system.InvalidOperationException, system.ArgumentException, system.InvalidCastException, system.NotSupportedException, system.ArgumentOutOfRangeException, system.MissingMethodException, system.reflection.TargetInvocationException, system.security.SecurityException, system.ObjectDisposedException, system.IndexOutOfRangeException, system.UnauthorizedAccessException, system.io.IOException, system.UriFormatException, system.globalization.CultureNotFoundException, system.RankException, system.NotImplementedException, system.SystemException, system.deployment.application.InvalidDeploymentException, system.MemberAccessException, system.MulticastNotSupportedException, system.componentmodel.Win32Exception, system.configuration.ConfigurationErrorsException, system.OverflowException, system.TimeoutException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Invoke("Navigate", root == null ? null : root.getJCOInstance(), navigationState == null ? null : navigationState.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public boolean Navigate(Uri source) throws Throwable, system.ArgumentNullException, system.resources.MissingManifestResourceException, system.InvalidOperationException, system.IndexOutOfRangeException, system.ArgumentException, system.InvalidCastException, system.NotSupportedException, system.MissingMethodException, system.security.SecurityException, system.ArgumentOutOfRangeException, system.ObjectDisposedException, system.UnauthorizedAccessException, system.io.IOException, system.OutOfMemoryException, system.globalization.CultureNotFoundException, system.configuration.ConfigurationErrorsException, system.net.WebException, system.NotImplementedException, system.componentmodel.Win32Exception, system.net.CookieException, system.security.XmlSyntaxException, system.RankException, system.SystemException, system.deployment.application.InvalidDeploymentException, system.MemberAccessException, system.UriFormatException, system.OverflowException, system.componentmodel.InvalidEnumArgumentException, system.TimeoutException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Invoke("Navigate", source == null ? null : source.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public boolean Navigate(Uri source, NetObject navigationState) throws Throwable, system.ArgumentNullException, system.resources.MissingManifestResourceException, system.InvalidOperationException, system.IndexOutOfRangeException, system.ArgumentException, system.InvalidCastException, system.NotSupportedException, system.MissingMethodException, system.security.SecurityException, system.ArgumentOutOfRangeException, system.ObjectDisposedException, system.UnauthorizedAccessException, system.io.IOException, system.OutOfMemoryException, system.globalization.CultureNotFoundException, system.configuration.ConfigurationErrorsException, system.net.WebException, system.NotImplementedException, system.componentmodel.Win32Exception, system.net.CookieException, system.security.XmlSyntaxException, system.RankException, system.SystemException, system.deployment.application.InvalidDeploymentException, system.MemberAccessException, system.UriFormatException, system.OverflowException, system.componentmodel.InvalidEnumArgumentException, system.TimeoutException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Invoke("Navigate", source == null ? null : source.getJCOInstance(), navigationState == null ? null : navigationState.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public boolean Navigate(Uri source, NetObject navigationState, boolean sandboxExternalContent) throws Throwable, system.ArgumentNullException, system.resources.MissingManifestResourceException, system.InvalidOperationException, system.IndexOutOfRangeException, system.ArgumentException, system.InvalidCastException, system.NotSupportedException, system.MissingMethodException, system.security.SecurityException, system.ArgumentOutOfRangeException, system.ObjectDisposedException, system.UnauthorizedAccessException, system.io.IOException, system.OutOfMemoryException, system.globalization.CultureNotFoundException, system.configuration.ConfigurationErrorsException, system.net.WebException, system.NotImplementedException, system.componentmodel.Win32Exception, system.net.CookieException, system.security.XmlSyntaxException, system.RankException, system.SystemException, system.deployment.application.InvalidDeploymentException, system.MemberAccessException, system.UriFormatException, system.OverflowException, system.componentmodel.InvalidEnumArgumentException, system.TimeoutException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Invoke("Navigate", source == null ? null : source.getJCOInstance(), navigationState == null ? null : navigationState.getJCOInstance(), sandboxExternalContent); } catch (JCNativeException jcne) { throw translateException(jcne); } } public JournalEntry RemoveBackEntry() throws Throwable, system.ArgumentNullException, system.resources.MissingManifestResourceException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.ArgumentException, system.IndexOutOfRangeException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objRemoveBackEntry = (JCObject)classInstance.Invoke("RemoveBackEntry"); return new JournalEntry(objRemoveBackEntry); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static NavigationService GetNavigationService(DependencyObject dependencyObject) throws Throwable, system.ArgumentNullException, system.resources.MissingManifestResourceException, system.NotImplementedException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.NotSupportedException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objGetNavigationService = (JCObject)classType.Invoke("GetNavigationService", dependencyObject == null ? null : dependencyObject.getJCOInstance()); return new NavigationService(objGetNavigationService); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void AddBackEntry(CustomContentState state) throws Throwable, system.ArgumentNullException, system.resources.MissingManifestResourceException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.ArgumentException, system.globalization.CultureNotFoundException, system.security.SecurityException, system.UnauthorizedAccessException, system.io.IOException, system.NotSupportedException, system.SystemException, system.deployment.application.InvalidDeploymentException, system.MemberAccessException, system.io.PathTooLongException, system.UriFormatException, system.componentmodel.InvalidEnumArgumentException, system.MulticastNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Invoke("AddBackEntry", state == null ? null : state.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void GoBack() throws Throwable, system.ArgumentNullException, system.ArgumentException, system.InvalidOperationException, system.MissingMethodException, system.reflection.TargetInvocationException, system.ArgumentOutOfRangeException, system.FormatException, system.resources.MissingManifestResourceException, system.NotImplementedException, system.ObjectDisposedException, system.threading.AbandonedMutexException, system.componentmodel.InvalidEnumArgumentException, system.MulticastNotSupportedException, system.NotSupportedException, system.security.SecurityException, system.UnauthorizedAccessException, system.io.IOException, system.RankException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Invoke("GoBack"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void GoForward() throws Throwable, system.ArgumentNullException, system.ArgumentException, system.InvalidOperationException, system.MissingMethodException, system.reflection.TargetInvocationException, system.ArgumentOutOfRangeException, system.FormatException, system.resources.MissingManifestResourceException, system.NotImplementedException, system.ObjectDisposedException, system.threading.AbandonedMutexException, system.componentmodel.InvalidEnumArgumentException, system.MulticastNotSupportedException, system.NotSupportedException, system.security.SecurityException, system.UnauthorizedAccessException, system.io.IOException, system.RankException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Invoke("GoForward"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void Refresh() throws Throwable, system.ArgumentNullException, system.resources.MissingManifestResourceException, system.InvalidOperationException, system.ArgumentException, system.ArgumentOutOfRangeException, system.IndexOutOfRangeException, system.ObjectDisposedException, system.globalization.CultureNotFoundException, system.OutOfMemoryException, system.NotSupportedException, system.InvalidCastException, system.security.SecurityException, system.UnauthorizedAccessException, system.io.IOException, system.net.WebException, system.NotImplementedException, system.componentmodel.Win32Exception, system.net.CookieException, system.security.XmlSyntaxException, system.NullReferenceException, system.RankException, system.SystemException, system.deployment.application.InvalidDeploymentException, system.UriFormatException, system.MulticastNotSupportedException, system.OverflowException, system.componentmodel.InvalidEnumArgumentException, system.TimeoutException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Invoke("Refresh"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void StopLoading() throws Throwable, system.ArgumentException, system.ArgumentNullException, system.NotSupportedException, system.MissingMethodException, system.security.SecurityException, system.ArgumentOutOfRangeException, system.ObjectDisposedException, system.IndexOutOfRangeException, system.UnauthorizedAccessException, system.io.IOException, system.InvalidOperationException, system.resources.MissingManifestResourceException, system.NotImplementedException, system.InvalidCastException, system.UriFormatException, system.RankException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Invoke("StopLoading"); } catch (JCNativeException jcne) { throw translateException(jcne); } } // Properties section public boolean getCanGoBack() throws Throwable, system.ArgumentNullException, system.resources.MissingManifestResourceException, system.InvalidOperationException, system.ArgumentOutOfRangeException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Get("CanGoBack"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public boolean getCanGoForward() throws Throwable, system.ArgumentNullException, system.resources.MissingManifestResourceException, system.InvalidOperationException, system.ArgumentOutOfRangeException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Get("CanGoForward"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public NetObject getContent() throws Throwable, system.ArgumentNullException, system.resources.MissingManifestResourceException, system.InvalidOperationException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("Content"); return new NetObject(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setContent(NetObject Content) throws Throwable, system.InvalidOperationException, system.ArgumentNullException, system.ArgumentException, system.InvalidCastException, system.NotSupportedException, system.security.SecurityException, system.ObjectDisposedException, system.UnauthorizedAccessException, system.io.IOException, system.ArgumentOutOfRangeException, system.RankException, system.NotImplementedException, system.SystemException, system.deployment.application.InvalidDeploymentException, system.UriFormatException, system.MulticastNotSupportedException, system.componentmodel.Win32Exception, system.OverflowException, system.componentmodel.InvalidEnumArgumentException, system.TimeoutException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("Content", Content == null ? null : Content.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public Uri getCurrentSource() throws Throwable, system.ArgumentNullException, system.resources.MissingManifestResourceException, system.InvalidOperationException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("CurrentSource"); return new Uri(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public Uri getSource() throws Throwable, system.ArgumentNullException, system.resources.MissingManifestResourceException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.UriFormatException, system.IndexOutOfRangeException, system.OutOfMemoryException, system.ArgumentException, system.globalization.CultureNotFoundException, system.NotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("Source"); return new Uri(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setSource(Uri Source) throws Throwable, system.InvalidOperationException, system.IndexOutOfRangeException, system.ArgumentNullException, system.ArgumentException, system.InvalidCastException, system.NotSupportedException, system.security.SecurityException, system.ObjectDisposedException, system.UnauthorizedAccessException, system.io.IOException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.UriFormatException, system.net.WebException, system.NotImplementedException, system.componentmodel.Win32Exception, system.net.CookieException, system.security.XmlSyntaxException, system.NullReferenceException, system.RankException, system.SystemException, system.deployment.application.InvalidDeploymentException, system.MulticastNotSupportedException, system.OverflowException, system.componentmodel.InvalidEnumArgumentException, system.TimeoutException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("Source", Source == null ? null : Source.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } // Instance Events section public void addFragmentNavigation(FragmentNavigationEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.RegisterEventListener("FragmentNavigation", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void removeFragmentNavigation(FragmentNavigationEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.UnregisterEventListener("FragmentNavigation", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void addLoadCompleted(LoadCompletedEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.RegisterEventListener("LoadCompleted", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void removeLoadCompleted(LoadCompletedEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.UnregisterEventListener("LoadCompleted", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void addNavigated(NavigatedEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.RegisterEventListener("Navigated", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void removeNavigated(NavigatedEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.UnregisterEventListener("Navigated", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void addNavigating(NavigatingCancelEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.RegisterEventListener("Navigating", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void removeNavigating(NavigatingCancelEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.UnregisterEventListener("Navigating", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void addNavigationFailed(NavigationFailedEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.RegisterEventListener("NavigationFailed", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void removeNavigationFailed(NavigationFailedEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.UnregisterEventListener("NavigationFailed", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void addNavigationProgress(NavigationProgressEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.RegisterEventListener("NavigationProgress", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void removeNavigationProgress(NavigationProgressEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.UnregisterEventListener("NavigationProgress", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void addNavigationStopped(NavigationStoppedEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.RegisterEventListener("NavigationStopped", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void removeNavigationStopped(NavigationStoppedEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.UnregisterEventListener("NavigationStopped", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy