當前位置: 首頁>>代碼示例>>Java>>正文


Java IMemento.putBoolean方法代碼示例

本文整理匯總了Java中org.eclipse.ui.IMemento.putBoolean方法的典型用法代碼示例。如果您正苦於以下問題:Java IMemento.putBoolean方法的具體用法?Java IMemento.putBoolean怎麽用?Java IMemento.putBoolean使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.ui.IMemento的用法示例。


在下文中一共展示了IMemento.putBoolean方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: saveState

import org.eclipse.ui.IMemento; //導入方法依賴的package包/類
@Override
public void saveState(IMemento memento) {
	// Scroll lock
	memento.putBoolean("scrollLock", scrollLock);

	// Limit log chars
	memento.putInteger("limitLogChars", limitLogChars);

	// Activate on new events
	memento.putBoolean("activateOnNewEvents", activateOnNewEvents);

	// Column order
	memento.putString("columnOrder", Arrays.toString(tableViewer.getTable().getColumnOrder()));

	// Column information
	for (ColumnInfo columnInfo : columnInfos) {
		IMemento columnInfoMemento = memento.createChild("columnInfo");
		columnInfoMemento.putString("name", columnInfo.getName());
		columnInfoMemento.putBoolean("visible", columnInfo.isVisible());
		columnInfoMemento.putInteger("size", columnInfo.getSize());
	}

	super.saveState(memento);
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:25,代碼來源:EngineLogView.java

示例2: saveCodeFolding

import org.eclipse.ui.IMemento; //導入方法依賴的package包/類
/**
 * Saves the code folding state into the given memento.
 */
public void saveCodeFolding(IMemento memento) {
	// The annotation model might be null if the editor opened an storage input
	// instead of a file input.
	if (projectionAnnotationModel == null) {
		return;
	}
	Iterator<?> annotationIt = projectionAnnotationModel.getAnnotationIterator();
	while (annotationIt.hasNext()) {
		ProjectionAnnotation annotation = (ProjectionAnnotation) annotationIt.next();
		IMemento annotationMemento = memento.createChild(ANNOTATION);
		Position position = projectionAnnotationModel.getPosition(annotation);
		annotationMemento.putBoolean(IS_COLLAPSED, annotation.isCollapsed());
		annotationMemento.putInteger(OFFSET, position.offset);
		annotationMemento.putInteger(LENGTH, position.length);
	}
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:20,代碼來源:DwprofileCodeFoldingManager.java

示例3: createLayerXml_120_Default

import org.eclipse.ui.IMemento; //導入方法依賴的package包/類
private static void createLayerXml_120_Default(	final IMemento xmlCategory,
												final boolean isEnabled,
												final boolean canSetOpacity,
												final float opacity,
												final String defaultLayerId) {

	final DefaultLayer mapDefaultLayer = MapDefaultLayer.getLayer(defaultLayerId);

	if (mapDefaultLayer == null) {
		return;
	}

	final IMemento xmlLayer = xmlCategory.createChild(TAG_LAYER);

	xmlLayer.putString(ATTR_ID, defaultLayerId);
	xmlLayer.putBoolean(ATTR_IS_ENABLED, isEnabled);
	xmlLayer.putBoolean(ATTR_IS_DEFAULT_LAYER, true);

	// opacity
	xmlLayer.putFloat(ATTR_OPACITY, opacity);
	xmlLayer.putBoolean(ATTR_CAN_SET_OPACITY, canSetOpacity);
}
 
開發者ID:wolfgang-ch,項目名稱:mytourbook,代碼行數:23,代碼來源:Map3Manager.java

示例4: createXmlProfile

import org.eclipse.ui.IMemento; //導入方法依賴的package包/類
private static IMemento createXmlProfile(	final XMLMemento xmlMemento,
											final int profileId,
											final String name,
											final String profileImagePath,
											final boolean isShadow,
											final float shadowValue,
											final String resolution) {

	final IMemento xmlProfile = xmlMemento.createChild(MEMENTO_CHILD_PROFILE);

	xmlProfile.putInteger(TAG_PROFILE_ID, profileId);
	xmlProfile.putString(TAG_NAME, name);
	xmlProfile.putString(TAG_IMAGE_PATH, profileImagePath);
	xmlProfile.putBoolean(TAG_IS_SHADOW, isShadow);
	xmlProfile.putString(TAG_RESOLUTION, resolution);
	xmlProfile.putFloat(TAG_SHADOW_VALUE, shadowValue);

	return xmlProfile;
}
 
開發者ID:wolfgang-ch,項目名稱:mytourbook,代碼行數:20,代碼來源:PrefPageSRTMColors.java

示例5: saveState_URI

import org.eclipse.ui.IMemento; //導入方法依賴的package包/類
private static void saveState_URI(	final URI[] location,
									final IMetadataRepositoryManager metaManager,
									final IMemento xmlRepositories,
									final boolean isEnabled) {

	for (final URI uri : location) {

		final IMemento xmlRepo = xmlRepositories.createChild(TAG_REPOSITORY);

		final String nickName = metaManager.getRepositoryProperty(uri, IRepository.PROP_NICKNAME);

		xmlRepo.putString(ATTR_URI, uri.toASCIIString());
		xmlRepo.putString(ATTR_NICK_NAME, nickName);
		xmlRepo.putBoolean(ATTR_IS_ENABLED, isEnabled);
	}
}
 
開發者ID:wolfgang-ch,項目名稱:mytourbook,代碼行數:17,代碼來源:P2_Activator.java

示例6: save

import org.eclipse.ui.IMemento; //導入方法依賴的package包/類
public void save(IMemento memento) {
  memento.putInteger(KEY_SORTCOLUMN, sortcolumn);
  memento.putBoolean(KEY_REVERSESORT, reversesort);
  memento.putString(KEY_COUNTERS, counters.name());
  memento.putString(KEY_ROOTTYPE, roottype.name());
  memento.putBoolean(KEY_HIDEUNUSEDELEMENTS, hideunusedelements);
  memento.putInteger(KEY_COLUMN0, columnwidths[0]);
  memento.putInteger(KEY_COLUMN1, columnwidths[1]);
  memento.putInteger(KEY_COLUMN2, columnwidths[2]);
  memento.putInteger(KEY_COLUMN3, columnwidths[3]);
  memento.putInteger(KEY_COLUMN4, columnwidths[4]);
  memento.putBoolean(KEY_LINKED, linked);
}
 
開發者ID:eclipse,項目名稱:eclemma,代碼行數:14,代碼來源:ViewSettings.java

示例7: rememberExpandState

import org.eclipse.ui.IMemento; //導入方法依賴的package包/類
@Override
protected void rememberExpandState(IMemento memento) {
	if (getContextObject() != null) {
		if (getContextObject() instanceof NamedElement) {
			NamedElement element = (NamedElement) getContextObject();
			if (element != null)
				memento.putBoolean(stripElementName(element.getName()) + IS_DEFINITION_SECTION_EXPANDED,
						isDefinitionSectionExpanded);
		}
	}
}
 
開發者ID:Yakindu,項目名稱:statecharts,代碼行數:12,代碼來源:StatechartDiagramEditor.java

示例8: saveProfile_FormatterData

import org.eclipse.ui.IMemento; //導入方法依賴的package包/類
private static void saveProfile_FormatterData(	final IMemento xmlAllTourFormatter,
												final FormatterData[] allFormatterData) {

	for (final FormatterData formatterData : allFormatterData) {

		final IMemento xmlFormatter = xmlAllTourFormatter.createChild(TAG_FORMATTER);

		xmlFormatter.putBoolean(ATTR_IS_SHOW_VALUE, formatterData.isEnabled);
		Util.setXmlEnum(xmlFormatter, ATTR_FORMATTER_ID, formatterData.id);
		Util.setXmlEnum(xmlFormatter, ATTR_FORMATTER_VALUE_FORMAT, formatterData.valueFormat);
	}
}
 
開發者ID:wolfgang-ch,項目名稱:mytourbook,代碼行數:13,代碼來源:CalendarProfileManager.java

示例9: saveState_Options

import org.eclipse.ui.IMemento; //導入方法依賴的package包/類
private static void saveState_Options(final XMLMemento xmlRoot) {

		final IMemento xmlOptions = xmlRoot.createChild(TAG_OPTIONS);
		{
			xmlOptions.putBoolean(ATTR_IS_ANIMATE_LOCATION, isAnimateLocation);
			xmlOptions.putFloat(ATTR_ANIMATION_TIME, animationTime);

			Util.setXmlEnum(xmlOptions, ATTR_ANIMATION_EASING_TYPE, animationEasingType);

			xmlOptions.putBoolean(ATTR_USE_DRAGGED_KEY_NAVIGATION, useDraggedKeyboardNavigation);
		}
	}
 
開發者ID:wolfgang-ch,項目名稱:mytourbook,代碼行數:13,代碼來源:Map25ConfigManager.java

示例10: saveMapProvider_10_CreateXml

import org.eclipse.ui.IMemento; //導入方法依賴的package包/類
/**
 * @return
 */
private static XMLMemento saveMapProvider_10_CreateXml() {

	XMLMemento xmlRoot = null;

	try {

		xmlRoot = saveMapProvider_20_CreateRoot();

		// loop: profiles
		for (final Map25Provider mapProvider : _allMapProvider) {

			final IMemento xml = xmlRoot.createChild(TAG_MAP_PROVIDER);

			xml.putBoolean(ATTR_IS_ENABLED, mapProvider.isEnabled);
			xml.putBoolean(ATTR_IS_DEFAULT, mapProvider.isDefault);

			xml.putString(ATTR_API_KEY, mapProvider.apiKey);
			xml.putString(ATTR_DESCRIPTION, mapProvider.description);
			xml.putString(ATTR_NAME, mapProvider.name);
			xml.putString(ATTR_TILE_PATH, mapProvider.tilePath);
			xml.putString(ATTR_URL, mapProvider.url);
			xml.putString(ATTR_UUID, mapProvider.getId().toString());

			Util.setXmlEnum(xml, ATTR_TILE_ENCODING, mapProvider.tileEncoding);
		}

	} catch (final Exception e) {
		StatusUtil.log(e);
	}

	return xmlRoot;
}
 
開發者ID:wolfgang-ch,項目名稱:mytourbook,代碼行數:36,代碼來源:Map25ProviderManager.java

示例11: saveState

import org.eclipse.ui.IMemento; //導入方法依賴的package包/類
@Override
public void saveState(final IMemento memento)
{
    memento.putBoolean(TAG_REGEX, regex.getSelection());
    memento.putBoolean(TAG_REPLACE, result_replace.getSelection());
}
 
開發者ID:kasemir,項目名稱:org.csstudio.display.builder,代碼行數:7,代碼來源:SearchView.java

示例12: writeXmlProfile

import org.eclipse.ui.IMemento; //導入方法依賴的package包/類
private void writeXmlProfile(final MPProfile mapProfile, final IMemento tagProfile) {

		tagProfile.putString(ATTR_MP_TYPE, MAP_PROVIDER_TYPE_MAP_PROFILE);

		tagProfile.putInteger(ATTR_PMP_BACKGROUND_COLOR, mapProfile.getBackgroundColor());

		/*
		 * map provider specific fields
		 */

		for (final MPWrapper mpWrapper : mapProfile.getAllWrappers()) {

			final MP mp = mpWrapper.getMP();

			final String mpType = getMapProviderType(mp);
			if (mpType == null) {
				continue;
			}

			final boolean isDisplayedInMap = mpWrapper.isDisplayedInMap();
			if (isDisplayedInMap == false) {
				// save only displayed map providers to reduce space
				continue;
			}

			final IMemento tagProfileMapProvider = tagProfile.createChild(TAG_MAP_PROVIDER_WRAPPER);

			tagProfileMapProvider.putString(ATTR_PMP_MAP_PROVIDER_TYPE, mpType);
			tagProfileMapProvider.putString(ATTR_PMP_MAP_PROVIDER_ID, mp.getId());
			tagProfileMapProvider.putInteger(ATTR_PMP_POSITION, mpWrapper.getPositionIndex());
			tagProfileMapProvider.putBoolean(ATTR_PMP_IS_DISPLAYED, isDisplayedInMap);
			tagProfileMapProvider.putInteger(ATTR_PMP_ALPHA, mpWrapper.getAlpha());
			tagProfileMapProvider.putBoolean(ATTR_PMP_IS_TRANSPARENT, mpWrapper.isTransparentColors());
			tagProfileMapProvider.putBoolean(ATTR_PMP_IS_BLACK_TRANSPARENT, mpWrapper.isTransparentBlack());
			tagProfileMapProvider.putBoolean(ATTR_PMP_IS_BRIGHTNESS_FOR_NEXT_MP, mpWrapper.isBrightnessForNextMp());
			tagProfileMapProvider.putInteger(ATTR_PMP_BRIGHTNESS_FOR_NEXT_MP, mpWrapper.getBrightnessValueForNextMp());

			// transparent colors
			final int[] transparentColors = mpWrapper.getTransparentColors();
			if (transparentColors != null) {

				// create a child for each color
				for (final int color : transparentColors) {

					// don't write black color this is with the attribute ATTR_PMP_IS_TRANSPARENT_BLACK
					if (color > 0) {
						tagProfileMapProvider//
								.createChild(TAG_TRANSPARENT_COLOR)
								.putInteger(ATTR_TRANSPARENT_COLOR_VALUE, color);
					}
				}
			}

			// wms layers
			if (mp instanceof MPWms) {
				writeXmlWmsLayers(tagProfileMapProvider, (MPWms) mp);
			}
		}

	}
 
開發者ID:wolfgang-ch,項目名稱:mytourbook,代碼行數:61,代碼來源:MapProviderManager.java

示例13: createXml_FromMarkerConfig

import org.eclipse.ui.IMemento; //導入方法依賴的package包/類
private static void createXml_FromMarkerConfig(final MarkerConfig config, final IMemento xmlMarkers) {

// SET_FORMATTING_OFF
		// <Marker>
		final IMemento xmlConfig = xmlMarkers.createChild(TAG_MARKER);
		{
			xmlConfig.putString(ATTR_ID, config.id);
			xmlConfig.putString(ATTR_CONFIG_NAME, config.name);

			/*
			 * Marker
			 */
			xmlConfig.putBoolean(		ATTR_IS_SHOW_MARKER_LABEL, 		config.isShowMarkerLabel);
			xmlConfig.putBoolean(		ATTR_IS_SHOW_MARKER_POINT, 		config.isShowMarkerPoint);
			xmlConfig.putInteger(		ATTR_MARKER_ORIENTATION,		config.markerOrientation);

			xmlConfig.putInteger(		ATTR_MARKER_FILL_OPACITY, 		config.markerFill_Opacity);
			xmlConfig.putInteger(		ATTR_MARKER_OUTLINE_OPACITY,	config.markerOutline_Opacity);
			xmlConfig.putFloat(			ATTR_MARKER_OUTLINE_SIZE, 		config.markerOutline_Size);
			xmlConfig.putInteger(		ATTR_MARKER_SYMBOL_SIZE, 		config.markerSymbol_Size);

			Util.setXmlRgb(xmlConfig, 	TAG_MARKER_OUTLINE_COLOR, 		config.markerOutline_Color);
			Util.setXmlRgb(xmlConfig, 	TAG_MARKER_FILL_COLOR, 			config.markerFill_Color);

			/*
			 * Cluster
			 */
			Util.setXmlEnum(xmlConfig, 	ATTR_CLUSTER_ALGORITHM, 		config.clusterAlgorithm);
			xmlConfig.putInteger(		ATTR_CLUSTER_GRID_SIZE, 		config.clusterGrid_Size);
			xmlConfig.putInteger(		ATTR_CLUSTER_ORIENTATION, 		config.clusterOrientation);
			xmlConfig.putBoolean(		ATTR_IS_MARKER_CLUSTERED, 		config.isMarkerClustered);

			xmlConfig.putInteger(		ATTR_CLUSTER_FILL_OPACITY, 		config.clusterFill_Opacity);
			xmlConfig.putInteger(		ATTR_CLUSTER_OUTLINE_OPACITY,	config.clusterOutline_Opacity);
			xmlConfig.putFloat(			ATTR_CLUSTER_OUTLINE_SIZE, 		config.clusterOutline_Size);
			xmlConfig.putInteger(		ATTR_CLUSTER_SYMBOL_SIZE, 		config.clusterSymbol_Size);
			xmlConfig.putInteger(		ATTR_CLUSTER_SYMBOL_WEIGHT, 	config.clusterSymbol_Weight);

			Util.setXmlRgb(xmlConfig, 	TAG_CLUSTER_OUTLINE_COLOR, 		config.clusterOutline_Color);
			Util.setXmlRgb(xmlConfig, 	TAG_CLUSTER_FILL_COLOR, 		config.clusterFill_Color);
		}
// SET_FORMATTING_ON
	}
 
開發者ID:wolfgang-ch,項目名稱:mytourbook,代碼行數:44,代碼來源:Map25ConfigManager.java

示例14: saveState_Profiles

import org.eclipse.ui.IMemento; //導入方法依賴的package包/類
private void saveState_Profiles(final XMLMemento xmlMemento) {

		for (final ColumnProfile profile : _allProfiles) {

			final IMemento xmlProfile = xmlMemento.createChild(TAG_PROFILE);

			xmlProfile.putString(ATTR_NAME, profile.name);

			if (profile == _activeProfile) {
				xmlProfile.putBoolean(ATTR_IS_ACTIVE_PROFILE, true);
			}

			/*
			 * visibleColumnIds
			 */
			final String[] visibleColumnIds = profile.visibleColumnIds;
			if (visibleColumnIds != null) {

				xmlProfile.putString(
						ATTR_VISIBLE_COLUMN_IDS,
						StringToArrayConverter.convertArrayToString(visibleColumnIds));
			}

			/*
			 * visibleColumnIdsAndWidth
			 */
			final String[] visibleColumnIdsAndWidth = profile.visibleColumnIdsAndWidth;
			if (visibleColumnIdsAndWidth != null) {

				xmlProfile.putString(
						ATTR_VISIBLE_COLUMN_IDS_AND_WIDTH,
						StringToArrayConverter.convertArrayToString(visibleColumnIdsAndWidth));
			}

			/*
			 * Column properties
			 */
			for (final ColumnProperties columnProperty : profile.columnProperties) {

				final IMemento xmlColumn = xmlProfile.createChild(TAG_COLUMN);

				xmlColumn.putString(ATTR_COLUMN_ID, columnProperty.columnId);

				final Enum<ValueFormat> columnFormat = columnProperty.valueFormat_Category;
				if (columnFormat != null) {
					xmlColumn.putString(ATTR_COLUMN_FORMAT_CATEGORY, columnFormat.name());
				}

				final Enum<ValueFormat> columnFormat_Detail = columnProperty.valueFormat_Detail;
				if (columnFormat_Detail != null) {
					xmlColumn.putString(ATTR_COLUMN_FORMAT_DETAIL, columnFormat_Detail.name());
				}
			}
		}
	}
 
開發者ID:wolfgang-ch,項目名稱:mytourbook,代碼行數:56,代碼來源:ColumnManager.java

示例15: writeXmlWms

import org.eclipse.ui.IMemento; //導入方法依賴的package包/類
private void writeXmlWms(final MPWms wmsMapProvider, final IMemento tagMapProvider) {

		tagMapProvider.putString(ATTR_MP_TYPE, MAP_PROVIDER_TYPE_WMS);
		tagMapProvider.putString(ATTR_WMS_CAPS_URL, wmsMapProvider.getCapabilitiesUrl());
		tagMapProvider.putString(ATTR_WMS_MAP_URL, wmsMapProvider.getGetMapUrl());
		tagMapProvider.putBoolean(ATTR_WMS_LOAD_TRANSPARENT_IMAGES, wmsMapProvider.isTransparent());

		writeXmlWmsLayers(tagMapProvider, wmsMapProvider);

	}
 
開發者ID:wolfgang-ch,項目名稱:mytourbook,代碼行數:11,代碼來源:MapProviderManager.java


注:本文中的org.eclipse.ui.IMemento.putBoolean方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。