code
stringlengths
73
34.1k
label
stringclasses
1 value
private void handleTmpView(View v) { Address new_coord=v.getCoord(); if(new_coord != null && !new_coord.equals(coord) && local_addr != null && local_addr.equals(new_coord)) handleViewChange(v); }
java
private void integrate(HashMap<String,Float> state) { if(state != null) state.keySet().forEach(key -> stocks.put(key, state.get(key))); }
java
protected static void sanityCheck(byte[] buf, int offset, int length) { if(buf == null) throw new NullPointerException("buffer is null"); if(offset + length > buf.length) throw new ArrayIndexOutOfBoundsException("length (" + length + ") + offset (" + offset + ...
java
public void setCertificate() throws KeyStoreException, IOException, NoSuchAlgorithmException, CertificateException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException, UnrecoverableEntryException { KeyStore store = KeyStore.getInst...
java
public static <T extends Header> T getHeader(final Header[] hdrs, short id) { if(hdrs == null) return null; for(Header hdr: hdrs) { if(hdr == null) return null; if(hdr.getProtId() == id) return (T)hdr; } return null; ...
java
public static Header[] putHeader(final Header[] headers, short id, Header hdr, boolean replace_if_present) { int i=0; Header[] hdrs=headers; boolean resized=false; while(i < hdrs.length) { if(hdrs[i] == null) { hdrs[i]=hdr; return resized? hdrs...
java
public static Header[] resize(final Header[] headers) { int new_capacity=headers.length + RESIZE_INCR; Header[] new_hdrs=new Header[new_capacity]; System.arraycopy(headers, 0, new_hdrs, 0, headers.length); return new_hdrs; }
java
protected static String print(BiConsumer<Integer,Integer> wait_strategy) { if(wait_strategy == null) return null; if(wait_strategy == SPIN) return "spin"; else if(wait_strategy == YIELD) return "yield"; else if(wait_strategy == PARK) r...
java
public void leave(Address mbr) { if(mbr == null) { if(log.isErrorEnabled()) log.error(Util.getMessage("MemberSAddressIsNull")); return; } ViewHandler<Request> vh=gms.getViewHandler(); vh.add(new Request(Request.COORD_LEAVE, mbr)); // https://issues.jboss.org/brows...
java
private Message unfragment(Message msg, FragHeader hdr) { Address sender=msg.getSrc(); FragmentationTable frag_table=fragment_list.get(sender); if(frag_table == null) { frag_table=new FragmentationTable(sender); try { fragment_list.add(sender, f...
java
public boolean decrementIfEnoughCredits(final Message msg, int credits, long timeout) { lock.lock(); try { if(queuing) return addToQueue(msg, credits); if(decrement(credits)) return true; // enough credits, message will be sent queuing=...
java
public static void add(short magic, Class clazz) { if(magic < MIN_CUSTOM_MAGIC_NUMBER) throw new IllegalArgumentException("magic ID (" + magic + ") must be >= " + MIN_CUSTOM_MAGIC_NUMBER); if(magicMapUser.containsKey(magic) || classMap.containsKey(clazz)) alreadyInMagicMap(magic,...
java
public static Class get(String clazzname, ClassLoader loader) throws ClassNotFoundException { return Util.loadClass(clazzname, loader != null? loader : ClassConfigurator.class.getClassLoader()); }
java
public static short getMagicNumber(Class clazz) { Short i=classMap.get(clazz); if(i == null) return -1; else return i; }
java
public void merge(Map<Address, View> views) { if(views == null || views.isEmpty()) { log.warn("the views passed with the MERGE event were empty (or null); ignoring MERGE event"); return; } if(View.sameViews(views.values())) { log.debug("MERGE event is ignored...
java
protected Address determineMergeLeader(Map<Address,View> views) { // we need the merge *coordinators* not merge participants because not everyone can lead a merge ! Collection<Address> coords=Util.determineActualMergeCoords(views); if(coords.isEmpty()) coords=Util.determineMergeCoord...
java
protected void sendMergeResponse(Address sender, View view, Digest digest, MergeId merge_id) { Message msg=new Message(sender).setBuffer(GMS.marshal(view, digest)).setFlag(Message.Flag.OOB,Message.Flag.INTERNAL) .putHeader(gms.getId(), new GMS.GmsHeader(GMS.GmsHeader.MERGE_RSP).mergeId(merge_id)); ...
java
protected void sendMergeView(Collection<Address> coords, MergeData combined_merge_data, MergeId merge_id) { if(coords == null || coords.isEmpty() || combined_merge_data == null) return; View view=combined_merge_data.view; Digest digest=combined_merge_data.digest; if(view == ...
java
protected void fixDigests() { Digest digest=fetchDigestsFromAllMembersInSubPartition(gms.view, null); Message msg=new Message().putHeader(gms.getId(), new GMS.GmsHeader(GMS.GmsHeader.INSTALL_DIGEST)) .setBuffer(GMS.marshal(null, digest)); gms.getDownProtocol().down(msg); }
java
public boolean allSet() { for(int i=0; i < seqnos.length; i+=2) if(seqnos[i] == -1) return false; return true; }
java
public Address[] getNonSetMembers() { Address[] retval=new Address[countNonSetMembers()]; if(retval.length == 0) return retval; int index=0; for(int i=0; i < members.length; i++) if(seqnos[i*2] == -1) retval[index++]=members[i]; return retv...
java
public long add(T element) { lock.lock(); try { long next=high+1; if(next - low > capacity()) _grow(next-low); int high_index=index(high); buffer[high_index]=element; return high++; } finally { lock.u...
java
public T remove(long seqno) { lock.lock(); try { if(seqno < low || seqno > high) return null; int index=index(seqno); T retval=buffer[index]; if(retval != null && removes_till_compaction > 0) num_removes++; buffe...
java
public RequestTable<T> grow(int new_capacity) { lock.lock(); try { _grow(new_capacity); return this; } finally { lock.unlock(); } }
java
@GuardedBy("lock") protected boolean _compact() { int new_cap=buffer.length >> 1; // needs to be a power of 2 for efficient modulo operation, e.g. for index() // boolean compactable=this.buffer.length > 0 && (size() <= new_cap || (contiguousSpaceAvailable=_contiguousSpaceAvailable(new_cap))); ...
java
protected void _copy(int new_cap) { // copy elements from [low to high-1] into new indices in new array T[] new_buf=(T[])new Object[new_cap]; int new_len=new_buf.length; int old_len=this.buffer.length; for(long i=low, num_iterations=0; i < high && num_iterations < old_len; i++, ...
java
public T remove() { lock.lock(); try { if(queue.isEmpty()) return null; El<T> el=queue.poll(); count-=el.size; not_full.signalAll(); return el.el; } finally { lock.unlock(); } }
java
public void addNewMessageToSend(MessageID messageID, Collection<Address> destinations, long initialSequenceNumber, boolean deliverToMyself) { MessageInfo messageInfo = new MessageInfo(destinations, initialSequenceNumber, deliverToMyself); if (deliverToMyself) { ...
java
public long addPropose(MessageID messageID, Address from, long sequenceNumber) { MessageInfo messageInfo = sentMessages.get(messageID); if (messageInfo != null && messageInfo.addPropose(from, sequenceNumber)) { return messageInfo.getAndMarkFinalSent(); } return NOT_READY; ...
java
public boolean markSent(MessageID messageID) { MessageInfo messageInfo = sentMessages.remove(messageID); return messageInfo != null && messageInfo.toSelfDeliver; }
java
public Set<Address> getDestination(MessageID messageID) { MessageInfo messageInfo = sentMessages.get(messageID); Set<Address> destination; if (messageInfo != null) { destination = new HashSet<>(messageInfo.destinations); } else { destination = Collections.emptySet...
java
public <T extends Average> T merge(T other) { if(Util.productGreaterThan(count, (long)Math.ceil(avg), Long.MAX_VALUE) || Util.productGreaterThan(other.count(), (long)Math.ceil(other.average()), Long.MAX_VALUE)) { // the above computation is not correct as the sum of the 2 products can stil...
java
public Collection<Range> getBits(boolean value) { int index=0; int start_range=0, end_range=0; int size=(int)((high - low) + 1); final Collection<Range> retval=new ArrayList<>(size); while(index < size) { start_range=value? bits.nextSetBit(index) : bits.nextClearBit(...
java
public void installRule(String name, long interval, Rule rule) { rule.supervisor(this).log(log).init(); Future<?> future=timer.scheduleAtFixedRate(rule, interval, interval, TimeUnit.MILLISECONDS); Tuple<Rule,Future<?>> existing=rules.put(name != null? name : rule.name(), new Tuple<>(rule, future...
java
protected void handleStateRsp(final Digest digest, Address sender, byte[] state) { try { if(isDigestNeeded()) { punchHoleFor(sender); closeBarrierAndSuspendStable(); // fix for https://jira.jboss.org/jira/browse/JGRP-1013 if(digest != null) ...
java
protected int advanceWriteIndex() { int num=0, start=write_index; for(;;) { if(buf[start] == null) break; num++; start=index(start+1); if(start == tmp_write_index.get()) break; } write_index=start; re...
java
void drawEmptyBoard(Graphics g) { int x=x_offset, y=y_offset; Color old_col=g.getColor(); g.setFont(def_font2); old_col=g.getColor(); g.setColor(checksum_col); g.drawString(("Checksum: " + checksum), x_offset + field_size, y_offset - 20); g.setFont(def_font); ...
java
private void onSuspend(final List<Address> members) { Message msg = null; Collection<Address> participantsInFlush = null; synchronized (sharedLock) { flushCoordinator = localAddress; // start FLUSH only on group members that we need to flush participantsInFlush...
java
protected static Digest maxSeqnos(final View view, List<Digest> digests) { if(view == null || digests == null) return null; MutableDigest digest=new MutableDigest(view.getMembersRaw()); digests.forEach(digest::merge); return digest; }
java
public List<Address> getNewMembership(final Collection<Collection<Address>> subviews) { ArrayList<Collection<Address>> aSubviews=new ArrayList<>(subviews); int sLargest = 0; int iLargest = 0; for (int i = 0; i < aSubviews.size(); i++) { int size = aSubviews.get(i).size(); ...
java
protected void sendLocalAddress(Address local_addr) throws Exception { try { // write the cookie out.write(cookie, 0, cookie.length); // write the version out.writeShort(Version.version); out.writeShort(local_addr.serializedSize()); // address size ...
java
protected Address readPeerAddress(Socket client_sock) throws Exception { int timeout=client_sock.getSoTimeout(); client_sock.setSoTimeout(server.peerAddressReadTimeout()); try { // read the cookie first byte[] input_cookie=new byte[cookie.length]; in.readFull...
java
public static void unregister(MBeanServer server, String object_name) throws Exception { Set<ObjectName> mbeans = server.queryNames(new ObjectName(object_name), null); if(mbeans != null) for (ObjectName name: mbeans) server.unregisterMBean(name); }
java
public void send(Address dst, byte[] buf, int offset, int length) throws Exception { ch.send(dst, buf, offset, length); }
java
public Object down(Event evt) { if(evt.type() == 1) // MSG return ch.down((Message)evt.getArg()); return ch.down(evt); }
java
public Value putIfAbsent(T key, long expiry_time) { if(key == null) key=NULL_KEY; Value val=map.get(key); if(val == null) { val=new Value(); Value existing=map.putIfAbsent(key, val); if(existing == null) return val; val=...
java
public int size() { int count=0; for(Value val: map.values()) count+=val.count(); return count; }
java
public void log(Level level, T key, long timeout, Object ... args) { SuppressCache.Value val=cache.putIfAbsent(key, timeout); if(val == null) // key is present and hasn't expired return; String message=val.count() == 1? String.format(message_format, args) : String.format(m...
java
@ManagedOperation public void enableReaping(long interval) { if(task != null) task.cancel(false); task=timer.scheduleWithFixedDelay(new Reaper(), 0, interval, TimeUnit.MILLISECONDS); }
java
public int add(final Message msg, boolean resize) { if(msg == null) return 0; if(index >= messages.length) { if(!resize) return 0; resize(); } messages[index++]=msg; return 1; }
java
public int add(final MessageBatch batch, boolean resize) { if(batch == null) return 0; if(this == batch) throw new IllegalArgumentException("cannot add batch to itself"); int batch_size=batch.size(); if(index+batch_size >= messages.length && resize) resize(message...
java
public MessageBatch replace(Message existing_msg, Message new_msg) { if(existing_msg == null) return this; for(int i=0; i < index; i++) { if(messages[i] != null && messages[i] == existing_msg) { messages[i]=new_msg; break; } } ...
java
public MessageBatch replace(Predicate<Message> filter, Message replacement, boolean match_all) { replaceIf(filter, replacement, match_all); return this; }
java
public int replaceIf(Predicate<Message> filter, Message replacement, boolean match_all) { if(filter == null) return 0; int matched=0; for(int i=0; i < index; i++) { if(filter.test(messages[i])) { messages[i]=replacement; matched++; ...
java
public int transferFrom(MessageBatch other, boolean clear) { if(other == null || this == other) return 0; int capacity=messages.length, other_size=other.size(); if(other_size == 0) return 0; if(capacity < other_size) messages=new Message[other_size]; ...
java
public Collection<Message> getMatchingMessages(final short id, boolean remove) { return map((msg, batch) -> { if(msg != null && msg.getHeader(id) != null) { if(remove) batch.remove(msg); return msg; } return null; })...
java
public <T> Collection<T> map(BiFunction<Message,MessageBatch,T> visitor) { Collection<T> retval=null; for(int i=0; i < index; i++) { try { T result=visitor.apply(messages[i], this); if(result != null) { if(retval == null) ...
java
public int size() { int retval=0; for(int i=0; i < index; i++) if(messages[i] != null) retval++; return retval; }
java
protected boolean shouldDropUpMessage(@SuppressWarnings("UnusedParameters") Message msg, Address sender) { if(discard_all && !sender.equals(localAddress())) return true; if(ignoredMembers.contains(sender)) { if(log.isTraceEnabled()) log.trace(localAddress + ": dr...
java
protected void drain() { Message msg; while((msg=queue.poll()) != null) addAndSendIfSizeExceeded(msg); _sendBundledMessages(); }
java
public E buildTextComponent() { final E textComponent = createTextComponent(); textComponent.setRequired(required); textComponent.setImmediate(immediate); textComponent.setReadOnly(readOnly); textComponent.setEnabled(enabled); if (!StringUtils.isEmpty(caption)) { ...
java
public void populateTableByDistributionSet(final DistributionSet distributionSet) { removeAllItems(); if (distributionSet == null) { return; } final Container dataSource = getContainerDataSource(); final List<TargetFilterQuery> filters = distributionSet.getAutoAssign...
java
private void createRequiredComponents() { distNameTextField = createTextField("textfield.name", UIComponentIdProvider.DIST_ADD_NAME, DistributionSet.NAME_MAX_SIZE); distVersionTextField = createTextField("textfield.version", UIComponentIdProvider.DIST_ADD_VERSION, Distrib...
java
private static LazyQueryContainer getDistSetTypeLazyQueryContainer() { final BeanQueryFactory<DistributionSetTypeBeanQuery> dtQF = new BeanQueryFactory<>( DistributionSetTypeBeanQuery.class); dtQF.setQueryConfiguration(Collections.emptyMap()); final LazyQueryContainer disttypeCo...
java
public void resetComponents() { distNameTextField.clear(); distNameTextField.removeStyleName("v-textfield-error"); distVersionTextField.clear(); distVersionTextField.removeStyleName(SPUIStyleDefinitions.SP_TEXTFIELD_LAYOUT_ERROR_HIGHTLIGHT); distsetTypeNameComboBox.removeStyleNam...
java
private CommonDialogWindow getWindow(final Long editDistId) { final SaveDialogCloseListener saveDialogCloseListener; String caption; resetComponents(); populateDistSetTypeNameCombo(); if (editDistId == null) { saveDialogCloseListener = new CreateOnCloseDialogListen...
java
private void populateDistSetTypeNameCombo() { distsetTypeNameComboBox.setContainerDataSource(getDistSetTypeLazyQueryContainer()); distsetTypeNameComboBox.setItemCaptionPropertyId(SPUILabelDefinitions.VAR_NAME); distsetTypeNameComboBox.setValue(getDefaultDistributionSetType().getId()); }
java
private void createMaintenanceScheduleControl() { schedule = new TextFieldBuilder(Action.MAINTENANCE_WINDOW_SCHEDULE_LENGTH) .id(UIComponentIdProvider.MAINTENANCE_WINDOW_SCHEDULE_ID) .caption(i18n.getMessage("caption.maintenancewindow.schedule")).validator(new CronValidator()) ...
java
private void createMaintenanceDurationControl() { duration = new TextFieldBuilder(Action.MAINTENANCE_WINDOW_DURATION_LENGTH) .id(UIComponentIdProvider.MAINTENANCE_WINDOW_DURATION_ID) .caption(i18n.getMessage("caption.maintenancewindow.duration")).validator(new DurationValidator()...
java
private void createMaintenanceTimeZoneControl() { // ComboBoxBuilder cannot be used here, because Builder do // 'comboBox.setItemCaptionPropertyId(SPUILabelDefinitions.VAR_NAME);' // which interferes our code: 'timeZone.addItems(getAllTimeZones());' timeZone = new ComboBox(); tim...
java
private static List<String> getAllTimeZones() { final List<String> lst = ZoneId.getAvailableZoneIds().stream() .map(id -> ZonedDateTime.now(ZoneId.of(id)).getOffset().getId().replace("Z", "+00:00")).distinct() .collect(Collectors.toList()); lst.sort(null); return ...
java
private static String getClientTimeZone() { return ZonedDateTime.now(SPDateTimeUtil.getTimeZoneId(SPDateTimeUtil.getBrowserTimeZone())).getOffset().getId() .replaceAll("Z", "+00:00"); }
java
private void createMaintenanceScheduleTranslatorControl() { scheduleTranslator = new LabelBuilder().id(UIComponentIdProvider.MAINTENANCE_WINDOW_SCHEDULE_TRANSLATOR_ID) .name(i18n.getMessage(CRON_VALIDATION_ERROR)).buildLabel(); scheduleTranslator.addStyleName(ValoTheme.LABEL_TINY); }
java
public void clearAllControls() { schedule.setValue(""); duration.setValue(""); timeZone.setValue(getClientTimeZone()); scheduleTranslator.setValue(i18n.getMessage(CRON_VALIDATION_ERROR)); }
java
public void clear() { queryTextField.clear(); validationIcon.setValue(FontAwesome.CHECK_CIRCLE.getHtml()); validationIcon.setStyleName("hide-status-label"); }
java
public void showValidationSuccesIcon(final String text) { validationIcon.setValue(FontAwesome.CHECK_CIRCLE.getHtml()); validationIcon.setStyleName(SPUIStyleDefinitions.SUCCESS_ICON); filterManagementUIState.setFilterQueryValue(text); filterManagementUIState.setIsFilterByInvalidFilterQuer...
java
public void showValidationFailureIcon(final String validationMessage) { validationIcon.setValue(FontAwesome.TIMES_CIRCLE.getHtml()); validationIcon.setStyleName(SPUIStyleDefinitions.ERROR_ICON); validationIcon.setDescription(validationMessage); filterManagementUIState.setFilterQueryValue...
java
public void showValidationInProgress() { validationIcon.setValue(null); validationIcon.addStyleName("show-status-label"); validationIcon.setStyleName(SPUIStyleDefinitions.TARGET_FILTER_SEARCH_PROGRESS_INDICATOR_STYLE); }
java
@Bean @ConditionalOnProperty(prefix = "hawkbit.server.security.dos.filter", name = "enabled", matchIfMissing = true) public FilterRegistrationBean<DosFilter> dosSystemFilter(final HawkbitSecurityProperties securityProperties) { final FilterRegistrationBean<DosFilter> filterRegBean = dosFilter(Collectio...
java
public static void addNewMapping(final Class<?> type, final String property, final String mapping) { allowedColmns.computeIfAbsent(type, k -> new HashMap<>()); allowedColmns.get(type).put(property, mapping); }
java
public void clearUploadTempData() { LOG.debug("Cleaning up temp data..."); // delete file system zombies for (final FileUploadProgress fileUploadProgress : getAllFileUploadProgressValuesFromOverallUploadProcessList()) { if (!StringUtils.isBlank(fileUploadProgress.getFilePath())) { ...
java
public boolean isUploadInProgressForSelectedSoftwareModule(final Long softwareModuleId) { for (final FileUploadId fileUploadId : getAllFileUploadIdsFromOverallUploadProcessList()) { if (fileUploadId.getSoftwareModuleId().equals(softwareModuleId)) { return true; } ...
java
private static <T extends Enum<T> & FieldNameProvider> T getAttributeIdentifierByName(final Class<T> enumType, final String name) { try { return Enum.valueOf(enumType, name.toUpperCase()); } catch (final IllegalArgumentException e) { throw new SortParameterUnsupported...
java
@EventListener(classes = CancelTargetAssignmentEvent.class) protected void targetCancelAssignmentToDistributionSet(final CancelTargetAssignmentEvent cancelEvent) { if (isNotFromSelf(cancelEvent)) { return; } sendCancelMessageToTarget(cancelEvent.getTenant(), cancelEvent.getEntit...
java
@EventListener(classes = TargetDeletedEvent.class) protected void targetDelete(final TargetDeletedEvent deleteEvent) { if (isNotFromSelf(deleteEvent)) { return; } sendDeleteMessage(deleteEvent.getTenant(), deleteEvent.getControllerId(), deleteEvent.getTargetAddress()); }
java
public void setValue(final Object value) { if (!(value instanceof Serializable)) { throw new IllegalArgumentException("The value muste be a instance of " + Serializable.class.getName()); } this.value = (Serializable) value; }
java
public void populateSMMetadata(final SoftwareModule swModule) { removeAllItems(); if (null == swModule) { return; } selectedSWModuleId = swModule.getId(); final List<SoftwareModuleMetadata> swMetadataList = softwareModuleManagement .findMetaDataBySoftw...
java
public void update(final List<Long> groupTargetCounts, final Long totalTargetCount) { this.groupTargetCounts = groupTargetCounts; this.totalTargetCount = totalTargetCount; if (groupTargetCounts != null) { long sum = 0; for (Long targetCount : groupTargetCounts) { ...
java
private Boolean doValidations(final DragAndDropEvent dragEvent) { final Component compsource = dragEvent.getTransferable().getSourceComponent(); Boolean isValid = Boolean.TRUE; if (compsource instanceof Table && !isComplexFilterViewDisplayed) { final TableTransferable transferable = ...
java
@Override public ResponseEntity<Void> deleteTenant(@PathVariable("tenant") final String tenant) { systemManagement.deleteTenant(tenant); return ResponseEntity.ok().build(); }
java
@Override public ResponseEntity<MgmtSystemStatisticsRest> getSystemUsageStats() { final SystemUsageReportWithTenants report = systemManagement.getSystemUsageStatisticsWithTenants(); final MgmtSystemStatisticsRest result = new MgmtSystemStatisticsRest() .setOverallActions(report.getO...
java
@Override @PreAuthorize(SpringEvalExpressions.HAS_AUTH_SYSTEM_ADMIN) public ResponseEntity<Collection<MgmtSystemCache>> getCaches() { final Collection<String> cacheNames = cacheManager.getCacheNames(); return ResponseEntity .ok(cacheNames.stream().map(cacheManager::getCache).map(...
java
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_SYSTEM_ADMIN) @Override public ResponseEntity<Collection<String>> invalidateCaches() { final Collection<String> cacheNames = cacheManager.getCacheNames(); LOGGER.info("Invalidating caches {}", cacheNames); cacheNames.forEach(cacheName -> cache...
java
protected void init(final String labelText) { setImmediate(true); addComponent(new LabelBuilder().name(i18n.getMessage(labelText)).buildLabel()); }
java
public Map<String, Object> getDeadLetterExchangeArgs(final String exchange) { final Map<String, Object> args = Maps.newHashMapWithExpectedSize(1); args.put("x-dead-letter-exchange", exchange); return args; }
java
public Queue createDeadletterQueue(final String queueName) { return new Queue(queueName, true, false, false, getTTLArgs()); }
java
public void updateTarget() { /* save updated entity */ final Target target = targetManagement.update(entityFactory.target().update(controllerId) .name(nameTextField.getValue()).description(descTextArea.getValue())); /* display success msg */ uINotification.displaySuccess(...
java
public Window getWindow(final String controllerId) { final Optional<Target> target = targetManagement.getByControllerID(controllerId); if (!target.isPresent()) { uINotification.displayWarning(i18n.getMessage("target.not.exists", controllerId)); return null; } popu...
java
public void resetComponents() { nameTextField.clear(); nameTextField.removeStyleName(SPUIStyleDefinitions.SP_TEXTFIELD_ERROR); controllerIDTextField.setEnabled(Boolean.TRUE); controllerIDTextField.removeStyleName(SPUIStyleDefinitions.SP_TEXTFIELD_ERROR); controllerIDTextField.cle...
java
public static String getColorPickedString(final SpColorPickerPreview preview) { final Color color = preview.getColor(); return "rgb(" + color.getRed() + "," + color.getGreen() + "," + color.getBlue() + ")"; }
java