public CentralContentPane() { // enable annotation AnnotationProcessor.process(this); setupMainPane(); addComponents(); }
@Override public void onStartScreen() { AnnotationProcessor.process(this); Player player = World.getPlayer(); Char playerChar = player.getCharacter(); hitPoints = playerChar.getAttribute(CharacterAttribute.HitPoints); foodPoints = playerChar.getAttribute(CharacterAttribute.FoodPoints); manaPoints = playerChar.getAttribute(CharacterAttribute.ManaPoints); }
/** Constructor */ public DeleteSelectedObservationsButton(ToolBelt toolBelt) { super(); setAction(new DeleteSelectedObservationsWithConfirmAction(toolBelt.getPersistenceController())); setToolTipText( "Delete selected observations [" + SwingUtils.getKeyString((KeyStroke) getAction().getValue(Action.ACCELERATOR_KEY)) + "]"); setIcon(new ImageIcon(getClass().getResource("/images/vars/annotation/obs_delete.png"))); setText(""); AnnotationProcessor.process(this); onSelectedObservationsEvent(new ObservationsSelectedEvent(null, Collections.EMPTY_LIST)); }
/** * Constructor for the StatusLabelForVideoArchive object * * @param toolBelt Friendly god object */ public StatusLabelForVideoArchive(ToolBelt toolBelt) { super(); Frame frame = (Frame) Lookup.getApplicationFrameDispatcher().getValueObject(); final Dispatcher videoArchiveDispatcher = Lookup.getVideoArchiveDispatcher(); dialog = new OpenVideoArchiveDialog(frame, toolBelt); dialog .getOkayButton() .addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { dialog.setVisible(false); VideoArchive videoArchive = dialog.openVideoArchive(); VideoArchiveSelectedEvent event = new VideoArchiveSelectedEvent(this, videoArchive); EventBus.publish(event); } }); AnnotationProcessor.process(this); // Register with EventBus update((VideoArchive) videoArchiveDispatcher.getValueObject()); /* * When the user clicks this label a dialog should pop up allowing them * to open the VCR. */ addMouseListener( new MouseAdapter() { Frame frame = (Frame) Lookup.getApplicationFrameDispatcher().getValueObject(); @Override public void mouseClicked(final MouseEvent me) { SwingUtils.flashJComponent(StatusLabelForVideoArchive.this, 2); final Point mousePosition = me.getPoint(); SwingUtilities.convertPointToScreen(mousePosition, StatusLabelForVideoArchive.this); int x = mousePosition.x; if (x < 1) { x = 1; } int y = mousePosition.y - dialog.getHeight(); if (y < 1) { y = 1; } dialog.setLocation(x, y); dialog.setVisible(true); } }); }
/** * Constructs a server manager. * * @param store * @param rscManager */ public EntryStore(final IdvObjectStore store, final IdvResourceManager rscManager) { notNull(store); notNull(rscManager); this.idvStore = store; this.trie = new PatriciaTrie<>(new CharSequenceKeyAnalyzer()); this.ADDE_DIRECTORY = getAddeRootDirectory(); this.ADDE_BIN = ADDE_DIRECTORY + File.separator + "bin"; this.ADDE_DATA = ADDE_DIRECTORY + File.separator + "data"; this.localPort = Constants.LOCAL_ADDE_PORT; this.restartingMcserv = false; this.lastAdded = arrList(); AnnotationProcessor.process(this); McIDASV mcv = McIDASV.getStaticMcv(); USER_DIRECTORY = mcv.getUserDirectory(); ADDE_RESOLV = mcv.getUserFile("RESOLV.SRV"); MCTRACE = "0"; if (McIDASV.isWindows()) { ADDE_MCSERVL = ADDE_BIN + "\\mcservl.exe"; } else { ADDE_MCSERVL = ADDE_BIN + "/mcservl"; } try { Set<LocalAddeEntry> locals = EntryTransforms.readResolvFile(ADDE_RESOLV); putEntries(trie, locals); } catch (IOException e) { logger.warn("EntryStore: RESOLV.SRV missing; expected=\"" + ADDE_RESOLV + '"'); } XmlResourceCollection userResource = rscManager.getXmlResources(ResourceManager.RSC_NEW_USERSERVERS); XmlResourceCollection sysResource = rscManager.getXmlResources(IdvResourceManager.RSC_ADDESERVER); Set<AddeEntry> systemEntries = extractResourceEntries(EntrySource.SYSTEM, sysResource); Set<AddeEntry> prefEntries = extractPreferencesEntries(store); prefEntries = removeDeletedSystemEntries(prefEntries, systemEntries); Set<AddeEntry> userEntries = extractUserEntries(userResource); userEntries = removeDeletedSystemEntries(userEntries, systemEntries); putEntries(trie, prefEntries); putEntries(trie, userEntries); putEntries(trie, systemEntries); saveEntries(); }
public HistoryManager() { AnnotationProcessor.process(this); undoList = new FastTable<>(); redoList = new FastTable<>(); }
@Override public void stopPlugin(String reason) { AnnotationProcessor.unprocess(this); }
@Override public void startPlugin() { AnnotationProcessor.process(this); loadConf(); }
@Override public void onEndScreen() { AnnotationProcessor.unprocess(this); }
private IMDBConfig() { // Subscribe to events AnnotationProcessor.process(this); loadConfig(); _imdbThread.start(); }
ServerFetcher(ServerConnectionInfo serverInfo, TerminationFuture future) { AnnotationProcessor.process(this); // if not using AOP this.serverInfo = serverInfo; this.terminationFuture = future; }